[erlang-questions] My biggest beef with Erlang
Christian S
chsu79@REDACTED
Mon Nov 26 13:42:48 CET 2007
2007/11/26, Joel Reymont <joelr1@REDACTED>:
> Plus, Lisp folk have been dealing with custom languages forever now.
> Creating DSLs in Lisp is very much encouraged.
>
> What makes Erlang different?
The difference is in the programmer, if the programmer is used to
macros or not.
For a programmer that is used to macros, seeing code with macros is no
more confusing than seeing code that calls new user-defined functions
(they too are a mechanism to extend the language, but syntactically
limited).
A sexpr-syntax for erlang would be really nice. I believe torbjörn
törnkvist found the right path, by writing a compiler that targets
core erlang (as he does for his haskell to beam compiler). (But I'm
not really qualified to guess :)
I call it a sexpr-syntax because I believe it would be wrong to
implement common lisp or scheme. I want everything to still feel like
Erlang, immutable values, pattern matching and single assignment,
capitalized variables & unquoted atoms, ..., but all in sexprs.
As for remote procedure-calls my current feeling is that this would
look quite okay: "Mod:Fun(Arg1, Arg2,...)" as "(:(Mod Fun) Arg1 Arg2
...)" a local call would be just (Fun Arg1 Arg2 ...) and that's the
common case. Does well with hierarchical module names too.
It follows common lisp syntax for arrays "#(1 2 3)" and for quoting
literals "'(a b c)" .
More information about the erlang-questions
mailing list