From: Software Scavenger
Subject: Why is delete-if-not deprecated?
Date: 
Message-ID: <a6789134.0112262349.47cc9ac3@posting.google.com>
delete-if-not seems very useful to me.  For example
   (delete-if-not 'integerp list)
   (delete-if-not 'zerop list)
   etc.

So why does the hyperspec say it's deprecated?
From: Kent M Pitman
Subject: Re: Why is delete-if-not deprecated?
Date: 
Message-ID: <sfw3d1xjasx.fsf@shell01.TheWorld.com>
··········@mailandnews.com (Software Scavenger) writes:

> delete-if-not seems very useful to me.  For example
>    (delete-if-not 'integerp list)
>    (delete-if-not 'zerop list)
>    etc.
> 
> So why does the hyperspec say it's deprecated?

Because it is a fact that it is. ;)

The question you want to ask is why the committee decided to deprecate it.
That was due to an attempt to clean up some inelegances in the language.
It started with the :test-not keywords, which really are vile.
Although it's handy to do:

 :test-not #'some-pred

the problem comes that it's theoretically possible to do

 :test #'some-pred :test-not #'some-other-pred

and so functions have to run slower testing that this bad situation didn't
happen.  We deprecated this, preferring you write

 :test (complement #'some-pred)

rather than

 :test-not #'some-pred

since by doing using just :test, you can't run into a conflict over which
is supposed to get used.

In making this change, we surveyed the language for other cases where
COMPLEMENT might be used and decided that 
 (foo-if-not #'f ...)
could be replaced by 
 (foo-if (complement #'f) ...)
but the community outcry was high, and I think legitimately so.  There was
no really compelling reason for the change, other than gratuitous consistency
or some trivial savings of size in the spec or the implementation.  In the
implementation, the number of compiler optimizations you have to add to
get back efficiency using COMPLEMENT is probably just not worth it anyway.

There is no material effect to deprecation.  It merely warns you that in a
future release, the feature might go away.  Present implementations must,
to conform, support it.  And the community is pretty well decided that the
-if-not functions aren't going away, so I wouldn't lose sleep over using it.