[erlang-questions] some language changes

Robert Virding robert.virding@REDACTED
Mon Jun 4 21:57:24 CEST 2007


James Hague wrote:
>> How would you replace Rest1 and Rest2 with simply Rest, and also let
>> the runtime know that in the second case you really want a fresh
>> variable, not to match against the old one?
>>
>> Or maybe I misunderstood?
> 
> Right, you'd need syntax for differentiating between fresh and
> existing variables.

But then WHAT'S THE POINT? Sorry for shouting. If you have to create a 
special syntax to show that you are updating a varible and not matching 
it haven't you lost any syntactic benefit you may have gained by be able 
to reuse variable names.

The only clean way to do that would be to introduce proper variable 
scoping, but that is a big change, both syntax and semantics.

Robert



More information about the erlang-questions mailing list