On Tue, 3 Sep 2003, Rick Measham wrote:
> ALSO If we go this path or not, I'd prefer not to get plain undef back.
> I'd like an indication that it was 'too hard to count', or that it was
> 'over 10,000'.
But undef means unknown, and if we can't count, we don't know how many
elements are in the set. We certainly can't return a number, and we can't
return a string or object because then people will do:
if ( my $count = $set->count ) { ... }
and that would succeed. So that leaves undef or an exception. It seems
silly to throw an exception here, and in fact I really don't like the idea
of accessor methods throwing exceptions.
-dave
/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/