From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: linked list rewrite |
Date: | 2004-03-24 06:10:20 |
Message-ID: | 11965.1080108620@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Neil Conway <neilc(at)samurai(dot)com> writes:
> It just doesn't strike me that "construction" is a very useful way to
> talk about what this operation is actually doing, and is asymmetric
> with lappend() for no good reason. The operation is "prepending" an
> element to an existing list, so why not give it a name that reflects
> that?
Historic practice. Sure, it's accident that lappend() is called what it
is, and it's accident that lcons() is called what it is, but there's not
adequate reason to rename either IMHO. You might as well argue that
begin/end are asymmetric and we ought to use begin/nigeb. (BTW I come
from a generation of programmers that actually did that sort of thing,
but fortunately the idea has mostly died out...)
Basically my argument is that we ought to preserve the well-entrenched
list function names. I'm prepared to grant that, say, set_ptrDifference
is not well known and can be renamed at little cost. I don't see the
cost-benefit argument for renaming lcons. There are real cognitive
costs to changing commonly known names, and this surely qualifies as one.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-24 06:36:56 | Re: linked list rewrite |
Previous Message | Bill C. | 2004-03-24 05:48:23 | Problems getting started: createdb fails |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-24 06:36:56 | Re: linked list rewrite |
Previous Message | Neil Conway | 2004-03-24 05:37:49 | Re: linked list rewrite |