Subject: Re: bug#63288: [PATCH] Mark cl-proclaim, cl-declaim, and cl-declare as obsolete

From: Thierry Volpiatto <[email-masked]>
Date: Wed, 19 Feb 2025 04:49:06 +0000

Stefan Kangas <[email-masked]> writes:

> Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <[email-masked]> writes:
>
>>> I really don't understand this code, I'm afraid.
>>
>> Don't worry: I don't think anybody does (I sure don't).
>>
>> It's code inherited from *many* years ago, where it approximated the
>> desired semantics via approximate hacks (like delaying assignments
>> until some package is loaded).
>>
>> We could try and go back to the CLHS doc to figure out what it "should"
>> do, and then implement it better.  But seeing how little it's used,
>> I doubt it's worth the trouble (my impression is that its intended
>> semantics doesn't align very well with our implementation(s), so it
>> would take work and/or ugly hacks to make it work "right").
>>
>>> So I'll commit the minimal change above, and hope that the rest of the
>>> problem goes away when you have the time to look at it next :-)
>>
>> Looking at it doesn't make me very happy, so I don't have any plan to
>> look at it.
>>
>> If you want to do me a favor you could try and mark it (both `proclaim`
>> and `declaim`) as deprecated.
>
> (This is a spin-off from Bug#63288.)
>
> The code for the cl-lib declarations, i.e. (info "(cl) Declarations"),
> is hacky, hard to maintain, and not well-understood by anyone.  It
> doesn't seem to provide any benefits over using standard Emacs Lisp
> facilities such as `declare`, `defvar`, and setting byte-compiler
> variables.

No, in some cases you must use (cl-declare (special ...)), and no you
can't use defvar in such cases, so if you intend to remove/deprecate
cl-declare ensure you provide the feature in declare.
Don't know for cl-proclaim and cl-declaim, I don't use them.

Thanks.

>
> The attached patch marks cl-proclaim, cl-declaim, and cl-declare as
> obsolete.
>
>

-- 
Thierry