[erlang-questions] Local namespaces in case/try
Wed Jul 11 03:38:07 CEST 2012
On 10/07/2012, at 10:52 PM, Sergei Lebedev wrote:
> Your argument makes sense, but I wonder why list comprehensions don't follow this design decision?
Because they were added later, and because
the pattern in a generator *has* to rebind those variables.
> Of course, from the implementation point of view the answer is obvious -- list comprehensions are compiled to functions,
There isn't the slightest reason why they *need* to be.
That's no part of their definition, and avoiding such
functions might well be more efficient.
More information about the erlang-questions