Severity: wishlist

In Bug#63288, we discussed making cl-proclaim and cl-declaim obsolete.
There consensus seems to be that this would be good.

The main use of cl-proclaim and cl-declaim is to enable some CL-Lib
specific optimizations by setting cl--optimize-speed and
cl--optimize-safety, and to set some byte-compiler variables.

It does seem quite strange to have such fundamental parts implemented in
cl-lib.el; if they are generally useful they should be made part of
Emacs Lisp proper and integrated as such.  If they are not, we should
just remove them.  In all cases, I think we should avoid maintaining
hard-to-understand and complex hacks in CL-Lib.

However, simply removing these CL-Lib specific variables makes the
compiled file size of eieieo-core.el (our only user of cl-declaim)
increase by almost 20%:

-rw-r--r--  1 skangas  staff  40705 Feb 24 21:31 eieio-core.elc
-rw-r--r--  1 skangas  staff  45572 Feb 24 21:31 lisp/emacs-lisp/eieio-core.elc

I'm a bit reluctant to make eieio slower, even if only a little, since
it's already known for not being fast.  So until we have a replacement
for cl--optimize-speed and cl--optimize-safety, I guess we'll have to
live with them.

Meanwhile, marking cl-proclaim and cl-declaim obsolete should at least
discourage using cl-lib for performance hacks, and hopefully encourage
more work on improving the byte-compiler instead.

The attached is the best patch I could come up with for now.

WDYT?