[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: e and pi
From: |
Drew Adams |
Subject: |
RE: e and pi |
Date: |
Sat, 18 Sep 2010 08:11:02 -0700 |
> > I once had a function with an argument called system-name. Suddenly
> > Emacs started to complain that some files are locked by
> > some other user. How many people now that system-name is a global
> > variable and used by the file-locking code?
> >
> > The lesson is that Emacs should not pre-define global variables with
> > names that are likely candidates for local variables.
>
> What you describe as a big surprise is actually known to every C/C++
> programmer: some names are "reserved by the implementation" and should
> not be used by the application code.
And can you imagine the fun if C/C++ reserved the name `e'? ;-)
Please read what the OP wrote: "should not pre-define global variables with
names that are _likely candidates for local variables_". That likelihood is
very high for `e', whether in C/C++ or Emacs Lisp. It is presumably not so high
for the implementation-reserved names of C/C++. (And since when did their
design become a guide for Emacs Lisp?)
- Re: e and pi, (continued)
- 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
- Re: e and pi, Stephen J. Turnbull, 2010/09/18
- RE: e and pi,
Drew Adams <=
- Re: e and pi, Stefan Monnier, 2010/09/17
- Re: e and pi, Chong Yidong, 2010/09/17
- Re: e and pi, Stefan Monnier, 2010/09/18
- 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