Lingua::Pangram

Andrew Wilson andrew at soto.kasei.com
Wed Jan 23 05:10:18 CST 2002


Hi Marc

On Wed, Jan 23, 2002 at 09:20:38AM +0000, Stray Toaster wrote:
> Bad Andrew! Bad, bad Andrew! If you ask me, which no one ever does, you
> should not rely on 0 and 1, and def not rely on them equating to true
> and false. Bad, bad, bad Andrew
> 
> It might just be me, but I prefer to test for definedness. I like to
> make all my *things* return true or undef. which is my false.
> 
> iyswim.

Sometimes I agree with this, testing if an object exists for instance I
would always check definedness (well now anyway) incase anyone has
overridden the stringification of the object.  This is just a rule of
thumb though.  Schwern pointed it out to me, it's really bad to test
for 1 and 0 being returned when you really mean true and false.  Sometimes
it's bad to check for truth when you should be checking definedness.
Horses for courses my man.

cheers

Andrew



More information about the Belfast-pm mailing list