On Wed, 10 Apr 2002, Michael G Schwern wrote:

> Don't fixate on it, write Test module with better set handling.

Ah, now I see what people don't understand about the point I was
trying to make.

Let me try again: that function does not take sets as parameters.
It takes arrays, which may or may not also be sets. The problem
lies not in the fact that it should use "bag" in the name or
whatever, but that you're broken from the beginning in creating
data objects that can be put into invalid states (if you consider
an array with duplicate values still to be a set) or you can change
one type into another with no warning (if you consider an array
with duplicate values to be no longer a set but a bag).

The whole problem could never have arisen if sets were objects
here, rather than, pretending that an array really is a set. That's
the point I'm trying to make.

And also note that then you wouldn't need any special test, since
your standard "is equal" test would invoke $obj1->is_equal($obj2).
(Assuming that they both accept those messages--otherwise it would
just compare the references to see if they both refer to the same
object).

cjs
-- 
Curt Sampson  <[EMAIL PROTECTED]>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC

Reply via email to