[Rd] all.equal.list() sometimes fails with unnamed and namedcomponents (PR#674)

Paul Gilbert pgilbert@bank-banque-canada.ca
Fri, 06 Oct 2000 10:35:49 -0400

>We can fix the problems in the bug report by deleting the code in
>all.equal.list() which compares the components.  That has the effect
>that named components are referred to as positional even if their names
>agree, and we should decide whether we want this or not.

Apologies if I've missed something, as I have not been following this discussion
very closely. However, this effect does not seem very good to me. I often build
lists by appending named components, and  delete named components by setting
them to NULL. I don't think it should be necessary to construct objects with the
named components in the same order for the results to be equal.

Of course, I start from the position that all lists should be named lists and
name truncation should be banned - and then realize this is unrealistic given
the current state of affairs. Perhaps we need a new object called "goodlist"
(rather than "hashtable").

One of the issues here is the difference between what interactive users want for
shortcuts and what package writers want for consistence. If list objects are
always accessed by functions (constructors, etc.), rather than having their
elements tweaked by users, then one tends to lean very heavily toward the
hashtable approach.

My 2 cents worth,
Paul Gilbert

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch