brian d foy wrote: > * If I can match $x to NaN (or its stand-in), what happens when $x is > undef?
undef is a property of the container variable (that it holds no value),
whereas NaN is a property of the content (like 1/0). so undef ~~ NaN
should be false IMHO.
> There's a note about this in S02 ("Conjecture: num might ...").
> "Native type" say that an int type defaults to 0, which complicates
> things for beginners, but if everything starts off as a num, it doesn't
> matter until we talk about types.
And "native" means "no container, no magic", so it can't be undef.
> * If I declare a sub to return a number of some sort (either by using
> C<of> or C<as>, what happens when the value is NaN or Inf? I suppose
> that should be fine as a return value, but it also seems that if
> someone wants to impose some sort of constaint on the return value that
> they wouldn't want exceptional values.
return a native type?
--
Moritz Lenz
http://moritz.faui2k3.org/ | http://perl-6.de/
signature.asc
Description: OpenPGP digital signature
