At 3:20 PM -0500 10/6/07, brian d foy wrote:
For comparisons, how are we going to use Inf and NaN? Are those going
to be special flyweight objects, so:

   $x = 1 / 0;
$x == Inf; # is it the same value
   $x === Inf;  # it is always the same object

Be mindful of the difference between value types and non value types. For value types, the generalized value equality test === can return true for 2 objects if they have the same value, but for non value types, === tests if they are the same object. All built-in number types are value types, so === and == would return the same answer for them. By contrast, the =:= operator always tests if 2 things are the same object or not, even for those of value types. -- Darren Duncan

Reply via email to