On Thu, 10 Dec 2015 12:35:34 -0500, Alex Knauth <[email protected]> wrote:
>In typed racket (- 1 1) and (- 2 2) are equal at runtime, but the type >checker doesn't necessarily know that at compile time. It knows that >(- 1 1) is zero because that's a special case in the type system. But it >doesn't have a special case for (- 2 2), so it only knows that that's a >Fixnum. But in this case the type checker isn't dealing with variables. Which begs the question why is (- 1 1) special cased? Shouldn't there be a general rule: (- C C) where C is a numeric constant? [Ok, I know equality is a problem with floating point ... but, still, the principle remains.] George -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

