From: Xah Lee
Subject: Re: I can not find a word better than "CAR"
Date: 
Message-ID: <a18bfd7b-dd1f-4e09-9e9a-892c933f622e@c18g2000prh.googlegroups.com>
On Jun 14, 11:48 am, ····@zedat.fu-berlin.de (Stefan Ram) wrote:
>   I was searching for a word referring to the »x« and »y« in the
>   relation »R(x,y)«.

in your case, first of all, you need to give a context. Without a
particular specialization, )first element( and )last element( is
perfect.

your question seems idiotic to me. It seems to be from the college
student who has nothing to do. Philosophizing is a good thing, but
your thinking on the issue as presented in your post is quite newbie.
I'll explain a bit.

>   I was searching for a word referring to the »x« and »y« in the
>   relation »R(x,y)«.

Ok. I'm expecting some context, or special field, that requires some
special terminology. However, you didn't give much in the rest of your
post. Fuzzily, you seem just want to rename the terms used in lisp
langs. i.e. your context, is lisp languages cons cells. But are you
considering this as for a new lisp lang? or do you mean this to be a
thought experiment about )What terms would it be if we were to update
lisp lingoes(? For a new lisp lang, trying to find a new term for
things similar to traditional lisp's car cdr is sensible. For updating
lisp lingoes, of course it won't fly in reality, but as a
philosophization, that's ok, however, the context is different from
say if you are writing a new lisp lang, and thus the candidate set of
good terms differ in the two contexts.

Ok, so now suppose we are looking for a term for the first/second
element of lisp's cons cell, and we are waxing philosophy on this, but
other than that, no other specifics.  Then, i think, )first( and )
second(, is good enough. Alpha and Beta is good, x and y could also be
employed.

also note that, the traditional term, )car( and )cdr(, are functions
that access the first or second elements. They don't refer to the
first or second elements themselves, it's just that it is also
convenient to use them to mean the first and second elements in
practice, because there's generally no ambiguity. More properly, you'd
say the )car component( or )cdr component(, or )first element of cons
cell( and )second element of cons cell(.

Assume, for a moment, the word would be
>   »alpha« and »beta«, respectively, then I would like to write
>   this explanation of "is a":
>
>     "is a"
>     the relation, where the alpha is an instance of the beta

several things wrong here.

First, please don't use the )is a( term. The usage doesn't make sense.
Did you pick up the )is a( phrase from the object oriented programing
community?

Secondly, the second element in a cons cell is not a )instance( of its
first element. The 2 elements in a cons cell do not have hierarchical
relation in any sense. Their only relation, is ordinal. i.e. one comes
after the other, as in B comes after A, 2 comes after 1, u comes after
i.

now, taking a lead from your fashion of thinking, i'm thinking what
possible good terms would be if we wax mathematics in... Mmm, there is
in fact a close analogue: complex numbers. So, your )car( can be
called the real part, and your )cdr( can be called imaginary part, and
a fashionable coder could say, that the cons cell has a )is a( )
relation(,
where the )complex( part is a )instance( of the )real( part. (I LOL)

>   I looked up these web pages to find common, simple words for
>   the place holders »alpha« and »beta«:
>
> http://en.wikipedia.org/wiki/Binary_relation
> http://en.wikipedia.org/wiki/Relation_algebra
>
>   .
>
>   I found none.

Let me give a analogy that illustrate your folly.

Suppose i'm creating a lisp-like lang, and in my lisp, i have a cons
like thing, except it has 3 cells. Suppose this )cons with 3 celles(,
is called )fons( in my lang. Fons has 3 accessors, called )car(, )cbr
(, )cdr(. These terms are based on lisp tradition. But now suppose,
i'm dissatisfied with these terms, so i looked up 3-body problems in
mathematics. JESUS, I FOUND NONE! Therefore, in actualality, car, cbr,
cdr are the best! When i see them, i don't think of IMB 666 registers.
I could use )first component(, )middle component(, )third component(,
but that constitute the ill of wordygidiss!

>   I could use »first component« and »second component«, but this
>   is a two-word term (compound term). I do not deem compound
>   terms to be appropriate for such fundamental concepts. For the
>   same reason, I prefer »pair« to »2-tuple«. A 2-tuple might
>   have a »first component« and a »second component«, but a pair
>   should have a CAR and a CDR (or some other single-word term).

Have you considered weet and woot?

Further readings:

• Fundamental Problems of Lisp
  http://xahlee.org/UnixResource_dir/writ/lisp_problems.html

• The Importance of Terminology's Quality In Computer Languages
  http://xahlee.org/UnixResource_dir/writ/naming_functions.html

• Jargons of Info Tech Industry
  http://xahlee.org/UnixResource_dir/writ/jargons.html

• Why You should Not Use The Jargon Lisp1 and Lisp2
  http://xahlee.org/emacs/lisp1_vs_lisp2.html

• The Term Currying In Computer Science
  http://xahlee.org/UnixResource_dir/writ/currying.html

• What Is Closure In A Programing Language
  http://xahlee.org/UnixResource_dir/writ/closure.html

• What are OOP's Jargons and Complexities
  http://xahlee.org/Periodic_dosage_dir/t2/oop.html

• Interface in Java
  http://xahlee.org/java-a-day/interface.html

• Math Terminology and Naming of Things
  http://xahlee.org/cmaci/notation/math_namings.html

• Politics and the English Language
  http://xahlee.org/p/george_orwell_english.html

By the way, )please( do )not( reverse the role of matching pairs such
as (1) ]2[ }3{ , »because, )you see?(, it fucks up senses.«

on this issue, please have a read at:

• The Moronicities of Typography
  http://xahlee.org/Periodic_dosage_dir/bangu/typography.html

bottom, on the section «Quotation Marks».

  Xah
∑ http://xahlee.org/

☄
From: DMCC
Subject: Re: I can not find a word better than "CAR"
Date: 
Message-ID: <79e6c27e-3ddd-460c-b079-cc5bd50d31e1@q14g2000vbn.googlegroups.com>
On Jun 16, 9:01 pm, Xah Lee <······@gmail.com> wrote:

> Let me give a analogy that illustrate your folly.
>
> Suppose i'm creating a lisp-like lang, and in my lisp, i have a cons
> like thing, except it has 3 cells. Suppose this )cons with 3 celles(,
> is called )fons( in my lang. Fons has 3 accessors, called )car(, )cbr
> (, )cdr(. These terms are based on lisp tradition. But now suppose,
> i'm dissatisfied with these terms, so i looked up 3-body problems in
> mathematics. JESUS, I FOUND NONE! Therefore, in actualality, car, cbr,
> cdr are the best! When i see them, i don't think of IMB 666 registers.
> I could use )first component(, )middle component(, )third component(,
> but that constitute the ill of wordygidiss!
>

No need to imagine, you can crete one in Lisp easily --

Scheme code:

(define (fons x y z)
  (define (set-x! v) (set! x v))
  (define (set-y! v) (set! y v))
  (define (set-z! v) (set! z v))
  (define (dispatch m)
    (cond ((eq? m 'car) x)
          ((eq? m 'cbr) y)
          ((eq? m 'cdr) z)
          ((eq? m 'set-car!) set-x!)
          ((eq? m 'set-cbr!) set-y!)
          ((eq? m 'set-cdr!) set-z!)
          (else (error "Undefined operation -- FONS" m))))
  dispatch)

(define (cons x y)
  (define (set-x! v) (set! x v))
  (define (set-y! v) (set! y v))
  (define (dispatch m)
    (cond ((eq? m 'car) x)
          ((eq? m 'cdr) y)
          ((eq? m 'set-car!) set-x!)
          ((eq? m 'set-cdr!) set-y!)
          (else (error "Undefined operation -- CONS" m))))
  dispatch)

(define (car z) (z 'car))
(define (cdr z) (z 'cdr))

(define (set-car! z new-value)
  ((z 'set-car!) new-value)
  z)
(define (set-cbr! z new-value)
  ((z 'set-cbr!) new-value)
  z)
(define (set-cdr! z new-value)
  ((z 'set-cdr!) new-value)
  z)