[erlang-questions] Erlang Syntax - again
James Hague
james.hague@REDACTED
Tue Mar 11 17:46:08 CET 2008
Ah, this topic :)
First the trivia:
1. I'm on board with getting rid of 'if'. I always had to stop and
think about whether I wanted 'if' or 'case' so now I use the latter
for everything.
2. Oh for swapping the meanings of "=:=" and "==".
Now the real issue: commas and semicolons. It used to bother me, to
the point where I considered writing a preprocessor to convert from
indentation-based formatting, but I've since gotten used to it. The
tricky part of indentation based syntax is that you can do stuff like
this:
[atom1, atom2, 2, case X of
true -> ...
false -> ...
end]
Python uses a continuation character at the end of the line, but yuck.
It *would* be nice to get rid of semicolons and periods for top-level
function definitions, though. That could be done without ambiguity
and mocked up via a Perl script in half an hour.
James
More information about the erlang-questions
mailing list