[erlang-questions] Local namespaces in case/try

Thomas Lindgren <>
Tue Jul 10 17:23:04 CEST 2012

----- Original Message -----
> From: Joe Armstrong <>
> ...
> There is no ultimate authority. Change is driven by the interplay of
> several factors:
>       - consensus (ie general agreement that something is good)
>       - payment (the people who finance Erlang pay to have something done)
>       - voluntary effort (individuals make changes, which are then adopted)

True. Still, I might agree with the OP in that Erlang probably would gain by having a "chief architect" or someone
along those lines to make the final decision. (Also regarding BIFs, APIs, ...) 

> As regards the changes you suggest:
> 1) Millions of lines of code have been written with the assumption
> that if you see a variable twice
> in the same lexical scope it has the same value. Changing this would
> mean that all old code
> must be retested and modified.

On the other hand, there _are_ ways to deprecate things these days. Erlang has replaced
the original type tests with long-winded ones, for instance. Aren't the old tests even illegal 

Another more interesting example is that of how users were discouraged from exporting variables from cases. 
I think this policy was changed (for whatever reason) by nagging, ie, making the compiler warn when it occurred.

The same could be done by emitting a warning when an already bound variable is matched.
I personally wouldn't mind, actually -- this is IMO a marginal feature and appears to occasionally confuse
even skilled practitioners, for instance on a silent pattern match failure.


More information about the erlang-questions mailing list