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: Philip Kaludercic
Subject: Re: [External] : Re: [NonGNU ELPA] New package: Denote-Refs
Date: Wed, 21 Dec 2022 00:05:01 +0000

Drew Adams <drew.adams@oracle.com> writes:

>> While I understand why () doesn't need to be quoted -- in the sense that
>> the reader sees no difference between the empty list literal and the
>> empty list notation -- I just don't like the inconsistency between the
>> requirement to quote a non-empty list if I want to inhibit evaluation,
>> while this is not the case for an empty list.
>> 
>> '(1 2 3) has to be quoted,
>> '(1 2) has to be quoted,
>> '(1) has to be quoted, but
>> '() suddenly doesn't?
>>
>> If it weren't necessary, I'd consider the `eq`ality
>> of '(), () and nil this an implementation detail.
>
> (list 1) and '(1) are (construct) conses.
> () isn't a cons.  
>
> Not just an implementation detail - different
> critters - as different as nullary constructor
> `zero' and unary constructor `successor'.



>> Another point is that in the case of deftheme, the () might look like a
>> empty parameter list, sort of like how (defun foo () ...) might look
>> like.  By explicitly quoting the list, we "clarify" that this is not the
>> same kind of thing.
>
> Can't speak to this; dunno what () you mean.

This one:

     (defun foo (bar) baz)
                ^

or in the case of a nullary function:

     (defun foo () baz)
                ^

> But `deftheme' is a macro.  Any understanding
> of any of its parts has to come from the doc
> string (or code).  A part (including ()) of a
> macro call could mean anything, depending on
> the macro definition.

I'll be honest, I have never used the MEMBERS parameter of `defgroup' (I
assume you meant that), but it appears it is passed without quotation:

  (macroexpand-1 '(defgroup foo bar "This is a group"))
  => (custom-declare-group 'foo bar "This is a group")

That means that this list is not just a part of the "syntax structure",
as it is with `defun', but an actual value.

> Anyway, I appreciate your communicating the
> reasons behind your preference.  There's no
> right or wrong when it comes to des goƻts et
> des couleurs.  Thx.

Sure, that is why I just suggested that Akib think about it, but if it
is his style to prefer nil over () or '(), then that is fine as well.



reply via email to

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