GNU bug report logs - #52290
28.0.90; Undocumented generalized variables

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Sun, 5 Dec 2021 01:27:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.90

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Phil Sainty <psainty <at> orcon.net.nz>, 52290 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#52290: 28.0.90; Undocumented generalized variables
Date: Sun, 05 Dec 2021 17:17:12 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> [...]  I.e., all the generalised variables that are used for side
> effect (as opposed to mutating an explicit object) are liable to cause
> confusion.

I would want to limit this to the kind of side effect: is it undoubtedly
clear what it is, is there a "canonical" side effect?  This is the case
e.g. for `buffer-modified-p' to a high degree, but not for
e.g. `point-max': there are several ways to achieve that `point-max'
will return a certain value - killing a certain amount of text, for
example.  Or narrowing.  Narrowing was not the thing that came to my
mind first.  A setter for it might cause confusion because the semantics
are not clear, in contrast to `buffer-modified-p', I think, where it is
quite clear.

I mean, Emacs is an editor, so we have more aspects of state than
variable bindings.  Setting variables can also have other side effects
than simply changing the variable's binding.  Per se I don't see a
problem in considering more kinds of state (more than variables) as
places.  OTOH, `point-max' for example is not really a self-contained
part of state, it's a value of a computation, a derived value.

The classification result can be a bit subjective and depend on the
viewing point, of course.


Michael.




This bug report was last modified 2 years and 289 days ago.

Previous Next


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