[erlang-questions] Changing the shell and module syntax and semantics
Ulf Wiger
ulf@REDACTED
Thu Mar 8 09:44:47 CET 2007
Den 2007-03-08 09:30:18 skrev Joe Armstrong <erlang@REDACTED>:
> Something to think about ...
>
> In the book beta, many people are reporting errors when they type things
> like
>
> -record(a, {b,v,d}).
>
>
> fac(0) -> 1;
> fac(N) -> N*fac(N-1)
>
> into the shell.
You can already define records in the shell - just not
with the record syntax.
Eshell V5.5.3 (abort with ^G)
1> rd(person, {name, age}).
person
2> Me = #person{name = ulf, age = 40}.
#person{name = ulf,age = 40}
3> Me#person.age.
40
4>
I think this is reasonably good. You should describe
this, and we can prototype extensions that would make
it even more convenient.
/Ulf W
--
Ulf Wiger
More information about the erlang-questions
mailing list