On Sun, Jan 6, 2013 at 2:55 PM, Robby Findler
<ro...@eecs.northwestern.edu> wrote:
> What if you added an extra field to immutable values (ie all TR structs
> would have this hidden field) such that, when they passed across a boundary,
> the field got mutated to say what type it passed at. Then, when the value
> passed back into TR, TR could check to see if has this secret field and what
> the type was and then avoid more checking.

The problem is that this info isn't available anywhere (and I'm not
sure it's really sensible).  Consider the `cons` function (on lists
only).  If you write `(cons 'hello empty)` in untyped code, what type
should get inserted, and where should that be calculated?  This
calculation can't really be done both automatically and correctly
ahead of time, and would add a bunch more expense.

Sam
_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Reply via email to