[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: e and pi
From: |
Stefan Monnier |
Subject: |
Re: e and pi |
Date: |
Sat, 18 Sep 2010 10:30:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>>> This doesn't sound right---it means that people will have to make sure
>>> their function args do not coincide with any defvar, defined anywhere.
>>> It won't just be "e" and "pi" causing problems. Someone might write
>>
>>> (defun froob (argv)
>>> (lambda (f) (cons f argv)))
>>
>>> and have that fail, because "argv" is a defvar defined in startup.el.
>>
>> Exactly: hence the new warning.
> This sounds fragile.
That's been used for ages in Common-Lisp. And it's the only reasonable
way to convert Elisp packages from dynamic-scoping to static-scoping
without having to change all `let' to something else (like lexical-let).
> If function argument names are the problem, why not just give them
> static scope, overriding any existing dynamic bindings? While it's
> idiomatic elisp to use `let' to bind dynamic variables, AFAICT no one
> uses function arguments to do the same.
No, the issue is:
does (let ((foo bar)) ...) bind `foo' lexically or dynamically?
-- Stefan
- Re: e and pi, (continued)
- Re: e and pi, David Kastrup, 2010/09/18
- Re: e and pi, Eli Zaretskii, 2010/09/18
- Re: e and pi, Andreas Schwab, 2010/09/18
- Re: e and pi, Stephen J. Turnbull, 2010/09/18
- RE: e and pi, Drew Adams, 2010/09/18
- Re: e and pi, Stefan Monnier, 2010/09/17
- Re: e and pi, Chong Yidong, 2010/09/17
- Re: e and pi,
Stefan Monnier <=
- Re: e and pi, Chong Yidong, 2010/09/18
- Re: e and pi, Uday S Reddy, 2010/09/18
- RE: e and pi, Drew Adams, 2010/09/18
- Re: e and pi, Juanma Barranquero, 2010/09/18
- Re: e and pi, Stefan Monnier, 2010/09/18
- Re: e and pi, Lars Magne Ingebrigtsen, 2010/09/18
- Re: e and pi, Stefan Monnier, 2010/09/18
- Re: e and pi, Juanma Barranquero, 2010/09/19
- RE: e and pi, Drew Adams, 2010/09/17
- Re: e and pi, tomas, 2010/09/18