help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Differences between Elisp and Lisp


From: Thomas Link
Subject: Re: Differences between Elisp and Lisp
Date: Tue, 29 Apr 2003 16:17:59 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

I thought that CL already implemented lexical binding? At least within
a let form (or "lexical-let").

I guess it's faking lexical binding by replacing variable names with gensyms. This makes it pseudo-lexical but not more efficient.

If emacs just went to using lexical binding in the large, I suspect
that it would cause lots of problems with existing packages. I have
used dynamic scoping to achieve ends in the past, which might be a bit
nasty, but it does work!

Correct me if I'm wrong, but e.g. Common Lisp has dynamic binding for variables defined with defvar. The following works with clisp:

        (defvar x 1)
        (defun y (a) (+ x 1))
        (y 1) => 2
        (let ((x 10)) (y 1)) => 11

So one could have both. The question is, which one should be the "default" mode and which one should be subject to special constructs.

Cheers,
Thomas.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]