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: Tue, 20 Dec 2022 16:48:23 +0000

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

>> > 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?
>> 
>> In this case it doesn't matter, because () is self-evaluating, but (foo)
>> isn't, so to me it seems more consistent to treat () as a list where I
>> want to make it explicit that I am inhibiting evaluation.
>
> Why do you want to make it explicit that you're
> inhibiting evaluation?
>
> As you say, in the case of () "it doesn't matter".
> But that's the only case we're (I'm) talking about.
>
> Apparently it does matter to you.  It matters to
> make it clear that you're inhibiting evaluation.
> Why?  What are you trying to say to a (human)
> reader by doing that?
>
> Not a rhetorical question; I really wonder what
> your thinking is about this.  You're not the first
> to do this on purpose, but I've never understood
> why someone would (in Elisp).

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.

> It's not a big deal, admittedly.  But to me doing
> that could suggest to a human reader that there's
> some difference between evaluating '() and ().
>
> To me, including in terms of communicating with a
> human, this case is no different from t/nil/42/:foo.
> Why "inhibit evaluation" of something that evaluates
> to itself, and why draw attention to the fact that
> you're doing that?  What's the human message there?
>
> I mean, if the point of using () instead of nil
> is to pass a certain connation to a human reader,
> then we're (both) trying to give some importance
> to that human message - saying a bit more than
> just that the value is nil.  In that context (of
> admittedly minor importance), avoiding suggesting
> something untrue is relevant.

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.



reply via email to

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