all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: psainty@orcon.net.nz, 58513@debbugs.gnu.org, rms@gnu.org,
	monnier@iro.umontreal.ca
Subject: bug#58513: describe-function should say that defconst variables are constant
Date: Mon, 17 Oct 2022 12:41:13 +0200	[thread overview]
Message-ID: <874jw2g2ba.fsf@gnus.org> (raw)
In-Reply-To: <CADwFkmm90EzB9J1-Zb_4fpwYUe3CuahwE=h+QZya0d8tMpfavg@mail.gmail.com> (Stefan Kangas's message of "Mon, 17 Oct 2022 05:41:09 +0000")

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	other threads:[~2022-10-17 10:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14 12:04 bug#58513: describe-function should say that defconst variables are constant Stefan Kangas
2022-10-14 12:23 ` Lars Ingebrigtsen
2022-10-14 12:35   ` Phil Sainty
2022-10-14 12:40     ` Lars Ingebrigtsen
2022-10-14 13:03       ` Stefan Kangas
2022-10-14 13:07         ` Lars Ingebrigtsen
2022-10-14 13:34           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-14 14:25             ` Lars Ingebrigtsen
2022-10-14 16:44               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15 10:04                 ` Lars Ingebrigtsen
2022-10-16 20:51                   ` Richard Stallman
2022-10-16 21:11                     ` Drew Adams
2022-10-17  5:41                     ` Stefan Kangas
2022-10-17 10:41                       ` Lars Ingebrigtsen [this message]
2022-10-15 12:33             ` Stefan Kangas
2022-10-15 14:11               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jw2g2ba.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=58513@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=psainty@orcon.net.nz \
    --cc=rms@gnu.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.