https://issues.dlang.org/show_bug.cgi?id=13489

Dicebot <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #13 from Dicebot <[email protected]> ---
(In reply to monarchdodra from comment #12)
> (In reply to Don from comment #11)
> > But I am certain that the current behaviour, that assert(NaN) passes, is
> > wrong.
> 
> Agreed. It was my understanding anyways that anything that operates on NaN
> produces "false" anyways.
> 
> I'd expect *both*:
> assert( NaN);
> assert(!NaN;
> 
> to fail, actually, since the fist one is "Are you non 0? No" and the second
> is "Are you 0? No."

I agree with this.

One additional thing to point out is that `assert` has already a precedent of
being more than just check for 0 - it calls object invariant. Thus meaning of
`assert(object)` is closer to "check if this thing is in usable state" and NaN
is not a usable state by definition.

--

Reply via email to