[erlang-questions] Local namespaces in case/try
Sun Jul 15 12:46:49 CEST 2012
So you are against changing context (as follows from your previous
message), and in the same time you prefer to change context of matching in
non-obvious (without carefully observing all case's branches) way? Shiny!
Don't you think that it's *way* less readable than explicit return of bunch
of variables (through tuples, for example) from case?
On Sunday, July 15, 2012 2:35:18 PM UTC+4, José Valim wrote:
> -rework case/if/receive statements to introduce their own namespaces. It
>> will not break any code that compiles without warnings, because reuse of
>> variables outside of case/if/receive emits a warning right now.
> Please don't. I would actually prefer if we didn't emit a warning in the
> first place (in fact I frequently disable it). This is a convenient feature
> and the compiler is smart enough to let us know if the variable is assigned
> in just one branch, which would introduce runtime errors.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions