forget
Matthias Lang
matthias@REDACTED
Thu May 30 21:15:41 CEST 2002
> I agree, in that the last thing Erlang needs is another fringe feature. The
> "language extensions since 4.4" section of the documentation is becoming
> daunting. But I do see this sort of "VarN =" code regularly, even in OTP
> itself, and it always makes me think that there has to be a better way.
As Joe alluded, the better way used by at least part of the functional
programming world is monads, for instance this article shows how they
could be used in Ulf Wiger's XML parser example (among others):
http://www.engr.mun.ca/~theo/Misc/haskell_and_monads.htm
But the R1, R2, R3 style of programming combined with the +warn_unused_vars
flag works reasonably sufficiently well for me that it doesn't seem
worth the added complexity (in the manual, among other places!) of monads.
Matthias
More information about the erlang-questions
mailing list