wild and crazy idea?

Romain Lenglet lenglet@REDACTED
Fri Feb 17 02:06:16 CET 2006


Ryan Rawson wrote:
> I actually disagree here.  I think the cool thing about Erlang
> is that lightweight and isolated processes are _part_ of the
> language.  That sending a message is a language construct and
> a basic part of the language, not a bolt on.  Another
> important effect is the functional nature of the language.  A
> major reason why I'm using Erlang is the pure functional
> nature.  I believe this will naturally lead to less bugs, as
> most common bugs come from constructs which are impossible or
> difficult to write in Erlang (loops on arrays for example).

To backup your argument, I also think that the *combination* of 
pattern matching and messaging in the language is a major 
feature. Being able to pattern-match a message in a receive 
construct is extremely useful, and cannot be done (at least 
easily) if one separates those two features.
Of course, pattern matching is also a major feature in itself, 
although not specific to Erlang.

> I'd also like to point out that "syntactic sugar" is not
> merely sweet, but it can be an essential feature of the
> language.  For example, list comprehensions - nothing that
> can't be done with recursion and lambdas, thus strictly its
> syntactic sugar.  But what they give you is the ability to
> more concisely talk about your ideas.  Why did Java add
> foreach, why does C# also have foreach?  The ability to
> express the pure concept instead of bogus things about
> iterators, and the like. No, the important thing is to do
> something for each item of a list. Foreach is merely on the
> path to list comprehensions :-)

I would also add unique assignment to variables, which prevents a 
lot of bugs.

> Plus I'd miss the live code upgrades.

-- 
Romain LENGLET



More information about the erlang-questions mailing list