[bitc-dev] Objects without subtypes

Sandro Magi naasking at higherlogics.com
Fri Oct 17 07:22:40 CDT 2008


Jonathan S. Shapiro wrote:
> What we now have in mind is to introduce a new constraint:
> 
>   (has-field 'a name 'b)
> 
> which is satisfied when the type 'a has a field with the given /name/,
> and that field in turn has type 'b. So the type of:
> 
>   (define (get-x v) v.x)
>   get-x (forall ((has-field 'a v 'b))
>           (fn 'a -> 'b))
> 
> that is: we will now do polymorphic inference over field names.

Isn't this just record polymorphism?

Sandro


More information about the bitc-dev mailing list