[erlang-questions] some language changes

Robert Virding <>
Tue Jun 5 02:22:38 CEST 2007


That's what I meant.

Robert

Kostis Sagonas wrote:
> Corrado Santoro wrote:
>>> 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?? 
> 
> I think you've misunderstood what Robert was referring to.  I think he 
> is thinking of something similar to ML's let which provides proper scope 
> for variables.
> 
>> Maybe introducing a syntax which is more and more hard than "A1 = A + 1"?
> 
> Of course we are approaching issues of taste here, but something like
> 
>    foo(A) ->
>       let B =
>          let
> 	   A = A + 1
>          in
> 	   bar(A)
>          end,
>       in
>          baz(A, B)
>       end.
> 
> is obviously considerably more verbose, but not necessarily harder (to 
> write or understand) than:
> 
>    foo(A) ->
>       A1 = A + 1,
>       B = bar(A1),
>       baz(A1, B).
> 
> Kostis
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 



More information about the erlang-questions mailing list