Don <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from Don <> 2009-12-18 22:49:41 PST ---
(In reply to comment #0)
> It was pointed out that Phobos has isIdentical, but that doesn't work with
> literals for some reason:
> float a;
> assert(isIdentical(a, float.init)) // fails!

That's because of the recently discovered NaN bug; the code generated for
uninitialized floats and doubles needs to change. It's not a problem with

> But it shouldn't be this hard.  Why does 'is' do a bitwise compare for
> everything *except* floating point numbers?

> I propose that for floating point types, x is y be equivalent to a bitwise
> compare.  It is easy to say in the spec "x is y does a bitwise compare, which
> for all builtin types except for floating point types is equivalent to
> equality"

I think this would be a good idea. I've thought that several times myself. I
created the isIdentical() function because I think there's a need for it.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to