emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: [NonGNU ELPA] New package: Denote-Refs


From: Drew Adams
Subject: RE: [External] : Re: [NonGNU ELPA] New package: Denote-Refs
Date: Mon, 19 Dec 2022 20:20:35 +0000

> >> -(defgroup denote-refs nil
> >> +(defgroup denote-refs '()
> > Why?
> 
> It is just a personal preference of mine, since the argument MEMBER is
> an alist.  I think that '() makes it more explicit that this is a list,
> as opposed to nil which might also be taken to be a truth value.  I
> guess () would do as well...

Yes, () would do as well - in fact better, since it
doesn't suggest any possibility that '() represents
something different from ().

You don't quote nil or t, do you?  Or 42 or "foo" or
:bar.  Why quote () then?

As the manual says:

  As far as the Lisp reader is concerned, '()' and 'nil'
  are identical: they stand for the same object, the
  symbol 'nil'.  The different ways of writing the symbol
  are intended entirely for human readers.  After the
  Lisp reader has read either '()' or 'nil', there is no
  way to determine which representation was actually
  written by the programmer.

  In this manual, we write '()' when we wish to emphasize
  that it means the empty list, and we write 'nil' when
  we wish to emphasize that it means the truth value FALSE.
  That is a good convention to use in Lisp programs also.

And yes, it's a good convention -- +1 for that.



reply via email to

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