On Nov 27, 2007 4:45 AM, Chris Eidhof &lt;<a href="mailto:chris@eidhof.nl">chris@eidhof.nl</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
First, some people want to use return just as an imperative programmer<br>would use it: to exit from a function. So the programmer doesn&#39;t<br>expect the commands after that return are executed.<br></blockquote><div><br>
This is more a problem with the name. I doubt this particular problem would arise if return were called something like &quot;pure&quot; (like the equivalent in Applicative). <br><br>I suspect the solution here is better documentation. There are logical reasons for return to be called &quot;return&quot;. We just need to point out to new programmers that it&#39;s not the same as return in other languages. Much like how Haskell&#39;s classes are not like the classes in object-oriented languages.
<br><br>Incidentally, lots of early monad papers use names like &quot;unit&quot;. When did Haskell settle on the name &quot;return&quot;? My guess is that it has something to do with the old monad comprehension syntax.<br>
</div></div><br>-- <br>Dave Menendez &lt;<a href="mailto:dave@zednenem.com">dave@zednenem.com</a>&gt;<br>&lt;<a href="http://www.eyrie.org/~zednenem/">http://www.eyrie.org/~zednenem/</a>&gt;