emacs-devel
[Top][All Lists]
Advanced

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

Re: e and pi


From: David Kastrup
Subject: Re: e and pi
Date: Sat, 18 Sep 2010 12:50:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Helmut Eller <address@hidden>
>> Date: Fri, 17 Sep 2010 18:18:25 +0200
>> 
>> >   (defun froob (argv)
>> >      (lambda (f) (cons f argv)))
>> >
>> > and have that fail, because "argv" is a defvar defined in startup.el.
>> 
>> 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.

For a function argument?  I beg to differ.  The only way to get a
conflict is using extern declarations.

And identifiers reserved by the implementation start with two
underlines.

-- 
David Kastrup




reply via email to

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