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

From: "Basil L. Contovounesios" <[email-masked]>
Date: Wed, 19 Feb 2025 18:53:18 +0100

Stefan Kangas [2025-02-19 01:08 +0000] wrote:

> 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.

Do we need the optimize/safety flag for cl-defstruct that Stefan M.
mentioned before we can declare cl-proclaim and cl-declaim obsolete?

Just to be clear, I mean that I'm not aware of an alternative to the
following:

  ;; -*- lexical-binding: t -*-
  (require 'cl-lib)
  (cl-declaim (optimize (safety 0)))
  (cl-defstruct foo a b)

which removes foo-p checks from the accessors foo-a and foo-b.

Either way, (info "(cl) Structures") may also need updating.

Thanks,
-- 
Basil