develooper Front page | perl.perl6.language | Postings from September 2005

Re: Stringification, numification, and booleanification of pairs

Thread Previous | Thread Next
From:
Juerd
Date:
September 22, 2005 00:45
Subject:
Re: Stringification, numification, and booleanification of pairs
Stuart Cook skribis 2005-09-22 10:39 (+1000):
> If there's no (single) obvious interpretation of "turn a value into a
> number" for a particular type, then don't struggle to come up with a
> non-obvious one--I say just leave it undefined, or have it fail(), or
> whatever.

Leaving it undefined is wrong whenever it can be avoided. Iff it has no
meaningful value, then we should try and make it meaningful in the scope
of the other two.

~$pair, because it has a \t in it, will always be true booleanly, and so
will ?$pair off course. Because of this, I think that ?+$pair should
also be true.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About