Erlang is getting too big
Richard A. O'Keefe
ok@REDACTED
Wed Oct 15 00:48:50 CEST 2003
Francesco Cesarini <francesco@REDACTED> wrote:
However, less than 5% of programmers end up using LCs, if not
less. People who are struggling to come to term with the rest
of the language don't, as it is yet another thing to take in.
Something they can solve with recursion.
The reason that I like higher order functions and comprehensions
is that they let me *avoid* recursion. Not that I don't like recursion;
I do. But years ago in Prolog I just got *sick* of writing yet another
list traversal; life is too short to keep writing the same code over and
over and over again.
I was originally opposed to the addition of anonymous functions to Erlang
(not that anyone asked my opinion) on the grounds that it made the language
more complicated, they weren't really needed, and it wasn't clear to me
what was supposed to happen when you reloaded a module that defined such
things and one or more of them was already in use.
I was wrong.
Higher order functions and list comprehensions can shorten your code a
*lot*, and clear brief code using well-known names for tarversal patterns
can be easier to read and maintain than stuff using basic language features.
Imagine trying to use Java without `for' and 'while' statements...
More information about the erlang-questions
mailing list