[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: suggestion on adding arguments to existing functions
From: |
Richard M. Stallman |
Subject: |
Re: suggestion on adding arguments to existing functions |
Date: |
Sat, 26 Nov 2005 19:32:12 -0500 |
My suggestion is to use `&optional' in a case like this, other things being
equal (that is, if there is no good reason not to). Why? Because otherwise
it unnecessarily breaks libraries that use the old form and (more
importantly, to me) libraries that try to work with multiple versions of
Emacs. It makes those libraries use ugly constructs such as this (or a macro
that does the same thing):
That's a good argument for functions that were meant for users to
call, but we need not worry about it for internal functions. Users
must be prepared for their calling conventions to change.
[Now, if there were a function that we could use to test the arity, that
would also be welcome here (a version test is not the first choice, if there
is an alternative). In Emacs 21 and 22 there is `sub-arity', but that only
works for built-in functions, IIUC.]
That would be a good feature to add, after the release.
I will add it to etc/TODO, but let's not discuss it now.