News for hackers. Stuff that matters.
Re:'9223372036854775807' == '9223372036854775808' by jrockway on Thursday April 12, 2012 @12:23PM (#3833057)
This is why I like programming languages with type systems and "numerical towers":

    Prelude> "9223372036854775807" == "9223372036854775808"
    False
    Prelude> "9223372036854775807" == 9223372036854775808

    <interactive>:1:25:
        No instance for (Num [Char])
          arising from the literal `9223372036854775808'
                   at <interactive>:1:25-43
        Possible fix: add an instance declaration for (Num [Char])
        In the second argument of `(==)', namely `9223372036854775808'
        In the expression: "9223372036854775807" == 9223372036854775808
        In the definition of `it':
        it = "9223372036854775807" == 9223372036854775808
    Prelude>
Yes. Strings are not numbers.
Re:'9223372036854775807' == '9223372036854775808' by bromagosa on Thursday April 12, 2012 @12:39PM (#3833137)
You don't actually need type systems to test equality and identity the right way...
Re:'9223372036854775807' == '9223372036854775808' by xyzzyz on Thursday April 12, 2012 @01:15PM (#3833300)
The point here is that these strings are neither equal nor identical.
Re:'9223372036854775807' == '9223372036854775808' by jrockway on Thursday April 12, 2012 @06:01PM (#3834399)
Yes, it's the implicit conversion that matters. If you try to write 2 == 2.0 in Haskell, it will blow up, because doubles and integers are not the same type. You need to explicitly convert one of them to another representation before you can compare them. That guarantees defined and repeatable semantics at compile time, which I think is excellent.

(This is not strictly required, of course; you can write a typeclass that defines a two-paramater ==, instead of a -> a -> Bool, it could be a -> b -> Bool. But that's dumb, so nobody does.)

Re:'9223372036854775807' == '9223372036854775808' by syaramak on Friday April 13, 2012 @01:17AM (#3835491)
Uh? I just tried it and it works without blowing up.

Prelude> 2 == 2.0 True