[erlang-questions] Changing the shell and module syntax and semantics

Bengt Kleberg <>
Thu Mar 8 09:55:46 CET 2007


On 2007-03-08 09:30, Joe Armstrong wrote:
...deleted
> In fact these is no good reason not to allow this in modules as well ...
> 
> -module(mmm).
> 
> X = 12 + lists:sqrt(23).
> 
> foo(A) ->
>      A + X.
> 
> .... etc....
> 
> This would *greatly* increase the power of Erlang and make things
> nicely symmetric

it would also make this code crash:

-module(mmm).

X = 12 + lists:sqrt(23).

foo(A) ->
	X = A+1,
...


which would be symmetric towards the shell but rather inconvenient in a 
big module.


bengt
-- 
Those were the days...
    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."



More information about the erlang-questions mailing list