[erlang-questions] LFE - Lisp Flavoured Erlang released
Mikael Pettersson
mikpe@REDACTED
Mon Mar 3 09:25:56 CET 2008
Yariv Sadan writes:
> Robert, this is very cool. I already started playing with LFE and it's
> great. Thanks a lot for sharing it.
>
> I have a couple of suggestions:
>
> - it would be nice to have a preprocessor/parse transform that converts the form
>
> (foo:bar baz ..)
>
> to
>
> (: foo bar baz ...)
>
> I find the former much more readable.
This I can agree with, as long as we're only talking about
literal module and function names, not general expressions.
> - It would like to have an Erlang-style '=' operator for binding
> instead of (let). The main difference is in the number of parentheses
> and the scoping rules. So, instead of
>
> (let ((a 1) (b 2)) (+ a b))
>
> you could write
>
> (= (a 1) (b 2))
> (+ a b)
NO! Absolutely no fricking way.
The way Erlang (ab)uses the '=' sign to do bindings is
IMNSHO one of the ugliest flaws in the language, in part
because it isn't structurally lexical scoped (bindings
flow /out/ of expressions, not just into them).
The point of Lisp/Scheme-like S-expression syntax is not
just using parenthesis for grouping, but also using the
structure to express scoping. LET-expressions do that,
your '=' abuse would not.
More information about the erlang-questions
mailing list