emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: master 101f3cf5b9: Add support for user edits to VC


From: Drew Adams
Subject: RE: [External] : Re: master 101f3cf5b9: Add support for user edits to VC command arguments
Date: Thu, 22 Sep 2022 22:21:16 +0000

> I thought that in Lisp we often call boolean values predicates too,

I do.  But I think it's become verboten for Emacs.

> even though that violates the usage of 'predicate' in mathematics.

No, it doesn't, actually.  A programming "variable"
can be likened to a nullary function.  That we also
have another kind of nullary function doesn't change
this.

(And a predicate "in mathematics" is not necessarily
a function at all.  There are several (related) uses
of the term.)

> Is there some other convention for booleans like this one?

I don't think I've seen one adopted by Emacs.  But
someone will correct me...

There is the `-flag' suffix convention for user
options (not other variables), which Stefan mentioned.
RMS promotes that.  I use it, but I may be the only
one who does.  I think it's helpful to have a separate
such suffix for options, even if that one is a bit long.

The argument Stefan makes against any such convention
is reasonable.  It's definitely the case that a var
often starts out as Boolean and later allows for more
values.  Renaming isn't such a big deal for user code.
But it's a pain for vanilla Emacs code (i.e., a big
user base).

This is a real consideration, no doubt.  But hey, this
is Lisp - schema-flexible, etc.  And we have aliasing.
Que demande le peuple ?

That worry/argument, BTW, doesn't apply to local vars,
e.g., let-bound vars and function parameters.  I often
use suffix `-p' in those contexts.  It's a very short
suffix, and it makes the code/intention clearer, IMHO.



reply via email to

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