HaloO,
brian d foy wrote:
So, then, back to the question. People don't care how it's implemented
(and it would be great if we didn't have to explain it). What's the
idiom for the comparison going to be?
My understanding is that values like NaN or Inf are exceptional. That
means you can
At 11:52 +0200 10/8/07, TSa wrote:
HaloO,
My understanding is that values like NaN or Inf are exceptional. That
means you can understand them as unthrown or in-band exceptions. Like
undef they might contain interesting information about their
origination. That being said I think these exceptional
In article [EMAIL PROTECTED], TSa
[EMAIL PROTECTED] wrote:
The only operator that can be used to investigate these values should
be ~~ and the given/when statement that uses it.
Why should that be true? What's wrong with treating it as an object
like anything else?
The trick is limiting the
In article [EMAIL PROTECTED], Moritz Lenz
[EMAIL PROTECTED] wrote:
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).
In article [EMAIL PROTECTED], Darren Duncan
[EMAIL PROTECTED] wrote:
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
I'm thinking about how to explain Perl 6's numbers to the beginners
just picking up Learning Perl 6. I had some questions about NaN and Inf
(which I can't just try since neither Parrot or Pugs appear to know
about these yet).
* In S02's table of Immutable types, it mentions that Int allows Inf
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
In article [EMAIL PROTECTED], brian d foy
[EMAIL PROTECTED] wrote:
I'm thinking about how to explain Perl 6's numbers to the beginners
just picking up Learning Perl 6. I had some questions about NaN and Inf
(which I can't just try since neither Parrot or Pugs appear to know
about these yet).
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