<div dir="ltr"><div>One of the surprising things of Haskell is how little effort is done in order to confer meaning to the names. That happens also in the case of the mathematical language. Often they have a single letter. The reason is that their meaning is completely defined by their signature and their properties. And this is possible because Haskell has a strong and polymorphic type system. In other languages, either this is not possible or the libraries have little polymorphism, so the names can be more concrete.</div>

<div> </div><div> </div><div>return :: (Monad m) =&gt; a -&gt; m a</div><div> </div><div>The meaning is in the signature. We can opt between keeping the name as a short mnemonic of the signature or else we can adhere to the C tradition:</div>

<div> </div><div>return === monad_m___a__m_a</div><div> </div><div>or the Java Tradition</div><div> </div><div>return =MonadFactory.liftSomethingSometimesPureButInSomeCasesTheResultIsAlsoPure</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">2013/8/7 Richard A. O&#39;Keefe <span dir="ltr">&lt;<a href="mailto:ok@cs.otago.ac.nz" target="_blank">ok@cs.otago.ac.nz</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
On 7/08/2013, at 2:10 PM, damodar kulkarni wrote:<br>
<br>
&gt; I bet you can find an abundance of C programmers who think that<br>
&gt; &quot;strcmp&quot; is an intuitive name for string comparison (rather than compression, say).<br>
&gt;<br>
&gt; But at least, &#39;strcmp&#39; is not a common English language term, to have acquired some unintentional &#39;intuition&#39; by being familiar with it even in our daily life. The Haskell terms, say, &#39;return&#39; and &#39;lift&#39;, on the other hand, do have usage in common English, so even a person with _no_ programming background would have acquired some unintentional &#39;intuition&#39; by being familiar with them.<br>


<br>
</div>&quot;Lift&quot; is - a brand of soft drink, the thing Americans call an elevator,<br>
a thing put in your shoes seem taller, and a free ride, amongst other things.<br>
As a verb, it can mean to kick something.<br>
<br>
To find &quot;lift&quot; intuitive, you have to be familiar with the *mathematical*<br>
idiom of &quot;lifting&quot; a value from one space to another via some sort of<br>
injection.  Fair enough, but this *still* counts as an example of<br>
&quot;intuitive = familiar&quot;, because this is *not* a sense of &quot;lift&quot; that is<br>
familiar to undergraduate and masters computing students unless they have<br>
taken rather more mathematics papers than most of them have.<br>
<br>
If you&#39;re familiar with *English* rather than, say, the C family of<br>
programming languages, &quot;return&quot; isn&#39;t _that_ bad, there is certainly<br>
nothing about the word that suggests providing a value.  I once tried<br>
to propose a C-style &#39;return&#39; statement to some people who were<br>
designing a programming language, before I or they had ever heard of<br>
C, and they flatly rejected it.  Months later I found out that this<br>
was because they were looking for something that did not just resume<br>
the caller but also provided a value, and when I protested that that&#39;s<br>
exactly what &#39;return&#39; did in the languages I proposed stealing from,<br>
they -- being familiar with Fortran -- said that it had never occurred<br>
to them that &#39;return&#39; could have anything to with providing a value.<br>
<br>
&quot;It is intuitive&quot; has no other discernable meaning than &quot;*I* am familiar with it,<br>
or something very much like it.&quot;<br>
<br>
_That&#39;s_ the point I want to make.  *Whatever* anyone uses for Haskell&#39;s<br>
&quot;return&quot;, many people are bound to find it unintuitive.  Choose a name<br>
on any grounds but that.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Alberto.
</div>