News for hackers. Stuff that matters.
Re:Swift Functors, Applicatives, and Monads in Pictures by skybrian on Tuesday July 14, 2015 @08:22PM (#9888985)
It certainly doesn't have to be flatmap. But the idea is that someone takes some time to think up an English name and does a bit of user testing to make sense to regular programmers.

This seems to be the approach that Elm is taking. (Although they're reluctant to add monads at all since they take ease of use seriously.)

Re:Swift Functors, Applicatives, and Monads in Pictures by wetmore on Wednesday July 15, 2015 @03:37AM (#9890181)
We all know that naming is one of the hard problems in computer science. Monads in programming have been around for 20+ years now, and you are certainly not the first one to complain about their name. So where are the better alternatives? Surely someone must have come up with a better one by now?

Instead we get nice "English" names which only work for certain monad instances and fail to adequately describe others.

Elm uses "andThen" instead of "bind", which works pretty well for the monadic types in its core library. But you need to start stretching your imagination to see why "andThen" makes sense for other monadic types. Honestly, I'm fine with "andThen", especially in the context of Elm and the monads it implicitly uses. But in the wider world of programming where exotic but useful monad instances exist I'd rather stick to the most general name.

By the way, the more pressing reason for Elm not having monads is the fact that it doesn't have typeclasses (or a similar concept) and doesn't allow you to parametrize over higher-kinded types (like Maybe).

Re:Swift Functors, Applicatives, and Monads in Pictures by gclaramunt on Tuesday July 14, 2015 @10:02PM (#9889306)
What's wrong with 'bind' ?
Re:Swift Functors, Applicatives, and Monads in Pictures by skybrian on Tuesday July 14, 2015 @11:54PM (#9889617)
What's being bound?

Perhaps "then" would work. JavaScript promises use it to good effect, and they're a monad.

Re:Swift Functors, Applicatives, and Monads in Pictures by VladimirGolovin on Wednesday July 15, 2015 @06:43AM (#9890619)
Smaller computations are being bound into a larger computation, where the monad provides the the code that is executed 'between the lines'.

(BTW, my own take on renaming a monad into something less scary is daisychain, or, slightly more to-the-point, chainable.)

Re:Swift Functors, Applicatives, and Monads in Pictures by tel on Friday July 17, 2015 @09:00AM (#9902485)

    (>>=) :: M a -> (a -> M b) -> M b
The `a` is bound in the second argument.