On Thu, Apr 11, 2002 at 10:02:59AM +0900, Curt Sampson wrote:
<some stuff about the wonders of OO snipped>
> 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.

What must be remembered is these are common testing modules for
testing common Perl data structures in common Perl programs written by
common Perl programmers.

A common Perl program will likely use a hash to represent a set.  Or
maybe they'll use one of the 16 different Set::* modules on CPAN.  Or
maybe they'll have their own set class.  Who knows?  It's not the job
of the testing module to decide.  You have to be flexible enough to
handle all those eventualities.  The most flexible way is to have your
tests accept the simplest way to represent a set in Perl: a hash.


If we had a single set class from which everyone derived set objects
we'd be Smalltalk.  TMTOWTDI.  Live it.  Love it.  Work with it.  Send
lamentations to the contrary to comp.lang.perl.misc. :)


(Really the whole problem could never had arisen if you hadn't let an
ECE dropout redesign Perl's testing infrastructure ;) )

-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Death?  Its like being on holiday with a group of Germans.

Reply via email to