[Haskell-cafe] Alternative name for return

Richard A. O'Keefe ok at cs.otago.ac.nz
Thu Aug 8 02:21:01 CEST 2013

On 8/08/2013, at 2:09 AM, damodar kulkarni wrote:
> Thanks for pointing this out, I was not able to point my thoughts in this direction.
> But I still have a doubt: if my familiarity doesn't come in the form of some "analogy", then my acquired intuition about "it" would be of little use. In fact, it may well be misleading. Am I correct?

Very much so.  This is why I despise, detest, and loathe as abominations
programming languages in which string concatenation is written "+".
(If you want a binary operation which is associative and has an identity
but doesn't commute, the product lies ready to hand, and the repeated
product (exponentiation) is actually _useful_ for strings.  It's still
better to use a non-arithmetic operator, as PL/I, Fortran, Ada, and Haskell do.)

> If so, the best we can hope is the name-giver to describe, as explicitly as possible, the "analogy" (sort of a thought process) he/she had had in his/her mind while giving a particular name to a given concept?

Complete agreement from me.

For what it's worth, "return" can mean "to shift back to a previous topic",
so it's not _that_ crazy for when you've switched from a monadic context
to a pure context and are now switching back.

More information about the Haskell-Cafe mailing list