[erlang-questions] some language changes

Corrado Santoro csanto@REDACTED
Mon Jun 4 22:15:31 CEST 2007


my two cents....

Robert Virding wrote:
> 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.
I completely agree!

When I approached Erlang, I was quite disapponted that I couldn't 
overwrite a variable. My "imperative language" basis required that I 
could always write  "A = A + 1" in any language.

But when I fully understood the power of Erlang matching, I said "well, 
it was the only way to keep the strong power of matching, which is the 
key aspect of Erlang... so let's write 'A1=A+1'".


> The only clean way to do that would be to introduce proper variable 
> scoping, but that is a big change, both syntax and semantics.
...uhmmmm.... but how can you do "A = A + 1" using variable scoping?? 
Maybe introducing a syntax which is more and more hard than "A1 = A + 1"?

IMHO, I don't think that it could be the case...

All the best,
--Corrado

-- 
==================================================================
Eng. Corrado Santoro, Ph.D.
University of Catania - ITALY - Engineering Faculty

Tel: +39 095 7382380        VoIP: sip:7035@REDACTED

Personal Home Page: http://www.diit.unict.it/users/csanto
     NUXI Home Page: http://nuxi.diit.unict.it
==================================================================




More information about the erlang-questions mailing list