GNU bug report logs - #76294
`(cl-proclaim (inline foo))` vs `(defsubst foo ...)`

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Fri, 14 Feb 2025 22:31:02 UTC

Severity: wishlist

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 76294 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 76294 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: bug#76294: `(cl-proclaim (inline foo))` vs `(defsubst foo ...)`
Date: Fri, 14 Feb 2025 17:52:38 -0500
> May I ask what is the value proposition of
>
>     (defun foo () ...)
>     (cl-proclaim '(inline foo))
>
> over
>
>     (defsubst foo () ...)
>
> in Emacs Lisp code?

I never dared to touch this because I know I'm biased against those
thingies.  IOW, I'd be happy to deprecate such usage.  🙂

> I'm asking because running into this in cl-lib.el made me start to
> consider the below patch.

Looks good to me.  I suspect the reason behind the current code might be
that `defsubst` was introduced after cl.el got (and used) `proclaim`.


        Stefan





This bug report was last modified 92 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.