[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: e and pi
From: |
Wojciech Meyer |
Subject: |
Re: e and pi |
Date: |
Fri, 17 Sep 2010 17:06:02 +0100 |
On Fri, Sep 17, 2010 at 4:50 PM, Chong Yidong <address@hidden> wrote:
> Stefan Monnier <address@hidden> writes:
>
>> in the current lexbind branch (where e is defined as a global/dynamic
>> variable), the below code would not do the same:
>>
>> (defun make-inc (e)
>> (lambda (f) (+ e f)))
>>
>> because "e" happens to be a predefined global variable with
>> dynamic-scoping semantics.
>
> 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.
That's why defvars should be with prefix.
Wojciech
- Re: e and pi, (continued)
Re: e and pi, Helmut Eller, 2010/09/17
Re: e and pi, Stefan Monnier, 2010/09/17
Re: e and pi, Wojciech Meyer, 2010/09/17
Re: e and pi, Chong Yidong, 2010/09/17
Re: e and pi,
Wojciech Meyer <=
Re: e and pi, Helmut Eller, 2010/09/17
Re: e and pi, Glenn Morris, 2010/09/17
Re: e and pi, Glenn Morris, 2010/09/17
Re: e and pi, Eli Zaretskii, 2010/09/18
Re: e and pi, Helmut Eller, 2010/09/18
Re: e and pi, Eli Zaretskii, 2010/09/18
Re: e and pi, Helmut Eller, 2010/09/18
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