Right.

The key distinction here is that TR is not so much reasoning about
constants, but about a singleton type. So TR is still working in terms
of types, not in terms of concrete values.

Vincent



On Thu, 10 Dec 2015 11:55:24 -0600,
'John Clements' via Racket Users wrote:
> 
> 
> > On Dec 10, 2015, at 9:50 AM, George Neuner <gneun...@comcast.net> wrote:
> > 
> > On Thu, 10 Dec 2015 12:35:34 -0500, Alex Knauth
> > <alexan...@knauth.org> 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.]
> 
> Check out the numeric tower in TR: there’s a type that includes just the 
> number 1. The natural extension to all numbers (each number has its own type) 
> leads (IIUC) to a totally intractable type system.
> 
> John
> 
> > 
> > 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 racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> 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 racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to