[erlang-questions] Monads in Erlang?
Richard O'Keefe
ok@REDACTED
Mon Mar 23 04:20:50 CET 2009
On 21 Mar 2009, at 4:19 am, Malcolm Dowse wrote:
> Unlike Richard, I personally don't think that there is a very strong
> case for trying to add monads to Erlang, because Erlang is such a
> different language to Haskell.
If you meant _this_ Richard, I don't believe I've ever said
"there is a very strong case". I thought I've been saying
that a desire for lots of numbered variables in Erlang is
generally an indication that it's time for a redesign.
I _do_ think it's interesting fun to think about what
reader/writer support might look like, but if I though there
was a very strong case for actually doing it, I'd write an EEP.
Do I need to point out that Erlang already _has_ an assignment
operation? That all of this updating of a state can already be
done by putting the state in the process dictionary, if necessary
creating a new process to ensure that it's safe?
> So, in my opinion, if you were to add monads into Erlang, you would
> just get a monad-like syntax, without any other benefits. And it's
> debatable whether this is really an improvement - it's more concise,
> but at the same time, more is hidden from view.
"More is hidden from view" is *precisely* the improvement of interest.
It's like saying "if you put salt on your food, all you'll do is make
it more salty." If I wanted to see everything that was going on, I'd
be programming in assembly code.
More information about the erlang-questions
mailing list