bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58513: describe-function should say that defconst variables are cons


From: Lars Ingebrigtsen
Subject: bug#58513: describe-function should say that defconst variables are constant
Date: Sat, 15 Oct 2022 12:04:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> - since that new branch always signals an error (well, in my own code,
>   that is: I don't know what that branch would end up doing on `master`
>   where we'd want to be more careful about backward compatibility), it's
>   expected to be more-or-less never taken and even the most naive branch
>   predictors should handle it "perfectly".

I see; that sounds good.

So perhaps we should be moving in this direction, then.

That is, start by making defconst mark the variables (perhaps in the way
you've already implemented?), and then make byte-compilation warn about
assigning to defconsts (and make describe-function expose the
information, as requested).

And then, in a later Emacs version, we could start enforcing the
constness in running code.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]