Monad of no `return` Proposal (MRP): Moving `return` out of `Monad`

Michael Walker mike at barrucadu.co.uk
Fri Sep 25 19:30:38 UTC 2015


> I propse to remove the "Legacy" designation (see below for reasoning).
> There should probably also be some reference to the Applicative type
> class, so I'd propose a wording more like:
> 
>     Alias for 'pure' in the 'Applicative' type class.
> 
> Reasoning: I happen to rather like "return" for purely pedagogical
> purposes since it lets you pretend (as a sufficient-for-beginners
> approximation) that code in the do-notation in IO is imperative code and
> "return" is the usual name for what it does in that context. I think
> that has a certain value, but "Legacy" is quite off-putting.

+1

"Legacy" suggests that there is a plan to remove `return` at some point.

-- 
Michael Walker (http://www.barrucadu.co.uk)


More information about the Libraries mailing list