[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Predicate for true lists
From: |
Basil L. Contovounesios |
Subject: |
Re: Predicate for true lists |
Date: |
Mon, 04 Jun 2018 17:14:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Drew Adams <address@hidden> writes:
>> > As for `cdr` vs CDR. The all-caps version is a metavariable referring
>> > to something which we happened to call CDR. E.g.
>> >
>> > Foo takes the form (CAR . CDR) where CDR is blabla.
>>
>> Right, but I see no such destructuring/metasyntax in the Elisp manual.
>> Both "(elisp) Cons Cells" and "(elisp) Cons Cell Type", for example,
>> refer directly to the CAR and CDR slots of a cons cell, without first
>> illustrating their structure. Is that OK?
>
> My answer probably does not reflect an Emacs doc-string or
> manual convention, but here are my 2 cents anyway:
>
> 1. Uppercase: As Stefan said, only when it refers to a
> piece of a pattern.
>
> 2. Lowercase in code font (e.g. what Stefan wrote as `cdr`
> and you wrote as `cdr'): Only when referring to the function.
>
> 3. Lowercase otherwise. In talking about Lisp, "car" and
> "cdr" are regular English words, just like "first" and "rest".
> They are Lisp jargon words, but they are English nevertheless.
Agreed.
> IOW, there's no reason we should not just talk about the cdr
> of a list, with no special typography used for the word "cdr".
In the manual, yes. In docstrings, on the other hand, I like that `cdr'
quoting results in a link to that function's documentation.
--
Basil
Re: Predicate for true lists, Paul Eggert, 2018/06/04
Re: Predicate for true lists, Basil L. Contovounesios, 2018/06/05