Neil Conway <[EMAIL PROTECTED]> writes:
> Most of your suggestions are agreeable; a few minor quibbles follow.

>> lfirstcell   new function to get first cell, or NULL if none
> [...]
>> llastnode    llastcell

> What do you think of list_head() and list_tail() instead?

No strong objection, though I thought it was a good idea to include
"cell" in the function names to suggest that what you are getting back
is just a cell and not a List.  Anyone else have a preference?

>> set_union    list_union
>> set_ptrUnion list_union_ptr
>> list_union_int               not currently used
>> set_uniono   list_union_oid

> I don't see the need for anything more than set_difference() and 
> set_difference_ptr() -- if we're passed a T_IntList or a T_OidList, we 
> can examine the list tag and do the Right Thing automagically.

Well, we could, but AFAIK there are no situations where the caller
doesn't know exactly what he wants, and so a switch in the function body
is just a waste of cycles.  It is probable that these functions are slow
enough and seldom-used enough that the extra switch doesn't matter much,
so that argument may not have much force.  I guess the real question in
my mind is whether there is any true gain in symmetry or readability by
doing it this way.  The other functions such as the cons family *will*
need to have the three variants, and so I question that it makes sense
to make these different.  Also the need for the _ptr variant makes it a
bit asymmetric even just when looking at these functions.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to