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: Mon, 17 Oct 2022 12:41:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Kangas <stefankangas@gmail.com> writes:

> So, to give a somewhat contrived example, you can still break any
> mathematical calculation in Emacs with:
>
>     (setq float-pi 9)
>
> The only way to not have your code break in the face of that is to
> copy-paste the literal 3.141592... everywhere.

Yeah, but you can make the same argument for functions.  We allow
redefining `+' (and there's no warnings or nothing), but people don't
guard against that, either.

That said, we (in effect) have markup stating the intention for
`float-pi' to be a constant, so adding warnings when people redefine it
makes sense (because it's more likely that somebody does that as a
mistake instead of mistakenly redefining `+').





reply via email to

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