[erlang-questions] some language changes
Darius Bacon
darius@REDACTED
Tue May 22 23:55:15 CEST 2007
Mike McNally <m5@REDACTED> wrote:
> I think it'd be really (REALLY) nice to have a "letrec" facility for
> "fun" expressions, so that they could more easily recurse (kind-of
> important in Erlang!). Maybe something like "fun <atom>(...) -> ... end"
> so that "<atom>" would be bound in the function appropriately.
It may be a bad idea to encourage code with substantial nested
functions in Erlang. When you say "X = foo()", its meaning depends on
the context -- whether X is already bound. The more context the
expression is nested within, the more this would matter. We're used to
lots of nesting in e.g. Scheme or Haskell, but in those languages the
scope rules are different.
Darius
More information about the erlang-questions
mailing list