So now all I'd like in Erlang is...

Shawn Pearce spearce@REDACTED
Fri Feb 20 15:15:40 CET 2004


Richard Carlsson <richardc@REDACTED> wrote:
> On Fri, 20 Feb 2004, Joachim Durchholz wrote:
> 
> > The reference to Fact is compiled into code that says: "retrieve
> > whatever is assigned to the name 'Fact'; crash if Fact is either
> > unassigned or assigned something other than a fun; evaluate parameters
> > and run the fun with them."
> 
> So you want dynamic binding, like in certain Lisp dialects?

Uhm, I don't know.  What if the following was run in parallel:

	{Foo, Bar} = {fun(X) Bar(X) end, fun(X) Foo(X) end}

ok, so its an infinite loop.  But when a fun is compiled, if the fun
could automatically assume that all variables which are going to be
bound as a result of the fun being created are also bound, as if the
had been bound before the expression?

This would make self-recursive funs easier to construct, as you would
no longer need to pass the fun to itself.

It doesn't solve the problem of forward references however.  And I think
we all agree, we'd just want the shorthand notation back, which is the
same syntax we use today.  :)

-- 
Shawn.

  Life is like a 10 speed bicycle.  Most of us have gears we never use.
  		-- C. Schultz



More information about the erlang-questions mailing list