On Sat, Dec 7, 2019 at 5:48 AM Richard Stallman <address@hidden> wrote:
> What does Common Lisp say about the return value of 'push'?
From the Common Lisp Hyperspec:
push item place => new-place-value
new-place-value---a list (the new value of place).
push prepends item to the list that is stored in place, stores the resulting list in place, and returns the list.
> If Common Lisp describes a certain return value for 'push',
> people will tend to use it that way,
Yes, though as I said, it is very rarely used, at least on our sources. 34 usesout of ~4,100.
There are also a lot like
(and test-1
test-2
...
(push item place))
but don't really depend on the return value of `push', they're just using `and'
as a conditional.
> and I think it would be
> a waste of time changing all code that ever depends on that return value.
At least for our sources, that time's already been wasted, whether we apply my
patch or not.
> It would be easier to document that return value.
I tend to agree, because I don't like gratuitously discarding CL compatibility.