Damian Conway wrote: > but I still have immense difficulty with the notion that: > > $x == NaN > > doesn't return true if $x contains NaN.
Anyone with a hardware background should have no difficulty with this concept. All common HDLs have multi-valued logic systems, including values like '0', '1' and 'x' (Some systems distinguish 9 different values!). The language Verilog has 2 equality operators. The most common is "a == b", which returns false if a and/or b contains 'x'. But it also provides "a === b"; which will return true if a and b are identical (thus true if a and b are 'x'). The correct value of "NaN == NaN" should, of course, be "NaN". This value should exponentially spread through the code: if ('cat' == 'dog') { $foo = 1 } else { $foo = 0 } assert($foo.isNaN); # true! However, Perl6 is not a hardware simulator, so I have no expectation that these semantics will be supported. Dave. -- Dave Whipp, Senior Verification Engineer, Fast-Chip inc., 950 Kifer Rd, Sunnyvale, CA. 94086 tel: 408 523 8071; http://www.fast-chip.com Opinions my own; statements of fact may be in error.