Re: linked list rewrite
От | Tom Lane |
---|---|
Тема | Re: linked list rewrite |
Дата | |
Msg-id | 11965.1080108620@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: linked list rewrite (Neil Conway <neilc@samurai.com>) |
Список | pgsql-hackers |
Neil Conway <neilc@samurai.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
В списке pgsql-hackers по дате отправления: