Car and cdr (Re: Python syntax in Lisp and Scheme)
Stephen Horne
$$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$.co.uk
Mon Oct 13 07:39:36 EDT 2003
On Mon, 13 Oct 2003 15:28:57 +1300, "Greg Ewing (using
news.cis.dfn.de)" <g2h5dqi002 at sneakemail.com> wrote:
>Andrew Dalke wrote:
>> It has sometimes been said that Lisp should use first and
>> rest instead of car and cdr
>
>I used to think something like that would be more logical, too.
>Until one day it occurred to me that building lists is only
>one possible, albeit common, use for cons cells. A cons cell
>is actually a completely general-purpose two-element data
>structure, and as such its accessors should have names that
>don't come with any preconceived semantic connotations.
>
> From that point of view, "car" and "cdr" are as good
>as anything!
"left" and "right" - referring to 'subtrees'?
--
Steve Horne
steve at ninereeds dot fsnet dot co dot uk
More information about the Python-list
mailing list