From: utzoo!decvax!harpo!seismo!hao!hplabs!sri-unix!mrose.uci@Rand-Relay
Newsgroups: net.emacs
Title: Re: bug(s)
Article-I.D.: sri-arpa.451
Posted: Mon Feb 14 08:15:36 1983
Received: Sun Feb 20 08:31:15 1983

From:  Marshall Rose 


    Regardless of whether you want to classify MockLisp functions as
    FEXPRs, the point still remains that the semantics of
    dynamic-binding are being violated.  The fact that recursion gets
    mangled is a side-effect of this.

    If we define

	(defun (foo1 i
		(foo2)
	       )
	)

	(defun (foo2
		(message "i = " i)
	       )
	)

    then if you invoke (foo1), the "i" that (foo2) uses must be the "i"
    defined in (foo1) by virtue of the fact that the "i" in (foo1) was
    the most recently declared variable with name "i".

    Similarly, if (foo2) defines a variable named "i", then the "i" that
    (foo2) uses must be that "i" since that "i" was the most recently
    declared variable with name "i".  The bottom line is that this
    doesn't work in MockLisp.  If some other binding strategy is used,
    say, lexical-binding, then that's fine, but it'd be nice to know
    the rules that the MockLisp interpreter is using when it decides
    which instantiation of a variable it's going to access.

/mtr