[erlang-questions] Erlang newbie questions

Richard O'Keefe <>
Wed Oct 19 23:00:42 CEST 2011


On 18/10/2011, at 1:17 PM, Gerry Weaver wrote:
> Is the Erlang language itself still evolving?

Yes.

> The reason I ask is that the fellow that did CouchDB posted a blog entry about the things he encountered while developing CouchDB. What was interesting to me is how, even after a short time with the language, many of the issues he mentioned immediately rang true with me. For example, what is the benefit of the "; , ." terminators as opposed to a single terminator approach?

Of those three punctuation marks, only ONE is a terminator, and that's full stop.
The other two are SEPARATORS (that is, like binary operators).

"," means SEQUENCE, like ";" in Algol (so in a guard, it means "AND")
";" means ALTERNATIVE                 (so in a guard, it means "OR").

Since you come from a C background, it may be clearest to say that "," is not entirely unlike ";"
and ";" is not entirely unlike "else", and you really wouldn't think it reasonable to unify
";" and "else" in C, now would you?  Nor would you think well of a proposal to unify "&&" and "||".

There are alternative syntaxes for Erlang, notably LFE (Lisp-Flavoured Erlang).
It's fair to say, though, that the syntax is the least important thing about
Erlang (or any other programming language).  The *semantics* is what matters most.

> 
> I assume a best practice is to minimize the use of modules written in other languages.

Indeed it is.  It's just like Java:  once you include C code all warranties are
voided.  If you do that you must exercise "trepidant vigilance", a phrase I got
from a Rex Stout story.





More information about the erlang-questions mailing list