News for hackers. Stuff that matters.
Re:What I Wish I Knew When Learning Haskell by pja on Tuesday June 17, 2014 @12:16PM (#7905248)
It should probably have been called 'unit' or 'pure' as it was in Wadler's original Monad/Haskell papers.

I don't know who decided that confusing legions of future programmers with the name 'return'; using do notation to carry out sequential programming in the IO Monad made calling it return too tempting I guess, even though it's a misleading name for all the other Monads.

Edit: A quick spelunk through the Haskell literature suggests that John Launchbury is probably to blame. His paper "Lazy Imperative Programming" appears to introduce both return and do-notation.

There are no comments on this comment yet.