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

Re: Proposed incompatible change to LISTP



I think we accidentally gave LISTP the wrong definition back when.
Currently (LISTP x) = (NOT (NLISTP x)) and (NLISTP x) = (ATOM x).
I would like to define (LISTP x) = (OR (NULL x) (NOT (ATOM x))) and
get rid of NLISTP entirely.  Thus LISTP (NLISTP) will never be the way
to terminate an iteration, rather it is the way to test if something
is a list of 0 or more elements.  The preferred way to terminate
an iteration will be NULL in most cases, or ATOM when it would be
reasonable not to consider a dotted list to be an error.  (If anyone
wants to push for ATOM to always be the preferred way to terminate
an iteration, speak now.  Currently it does not generate as good code,
but that would not be terribly difficult to change.  I might even
be wrong about that.)

The NIL people are muttering about "CONSP" and "PAIRP", but I don't
see any advantage of those over ATOM, unless one has hunks, which we
will never have.  If necessary we can define one or both of those
functions for compatibility, but I am not proposing to do so now.

If there are no demurrers in the next couple days, I will announce this
to users and remove all usage of LISTP and NLISTP in the system source,
preparatory to making the incompatible change.  Compiled code that calls
those functions will continue to work since they are open-coded.