[erlang-questions] erlang sucks

attila.rajmund.nohl@REDACTED attila.rajmund.nohl@REDACTED
Tue Mar 11 19:25:03 CET 2008


On Tue, 11 Mar 2008, Mats Cronqvist wrote:
[...]
> more so because most of his complaints are essentially valid.
> *  the syntax does suck. for beginners, because it looks weird (i.e. not like 
> ALGOL), thus being a major obstacle to adoption. for pros, because the silly 
> separators, and the needless verbosity (lambdas, using 'receive' instead of 
> '?', etc)
> * 'if' is  completely worthless, and should ideally be obsoleted.
> * strings as lists of integers is often annoying.
> * the X1=x1(X),X2=x2(X1),,, pattern is tedious and error prone.
> * records are  "limited and verbose" (for a reason, but still)
> * some of the libs/docs are of poor quality.

There's one more thing that sometimes drive me nuts - due to the lack of
decent 'if' statement, new functions are written instead of branches of
a conditional statement. So I see a lot of code like this:
do_something(X, Y) ->
     really_do_something(X, Y).

really_do_something(a, Y) ->
     really_really_do_something(a, Y);
...

really_really_do_something(a, b) ->
     ... % could be a one liner

The problem is that the really_really_do_something is way to long to
type for people whose editor can't complete function names, so they'll
write rrds instead - which is very non-intuitive. I've just checked and
our code contains more than 150 functions with 3 character name, more
than 50 functions with 2 character name and more than 150 functions with
4 character name. Some of these names actually make sense (e.g. get,
set), but most of them do not - and I don't like function names that do
not make sense. I haven't seen this practice in C++ or Java projects.

 				Bye,NAR
-- 
"Beware of bugs in the above code; I have only proved it correct, not
  tried it."



More information about the erlang-questions mailing list