Jonathan S. Shapiro wrote:
> In O'Caml, field names are not scoped by their structure type. They are
> global. In consequence, in the reference:
> 
>   x.y
> 
> The symbol resolver can resolve the field name 'y' without reference to
> 'x'. Since 'y' is global, it is uniquely associated with exactly one
> (possibly polymorphic) structure definition. The result is that O'Caml
> never has to introduce any sort of constraint here -- the constraint is
> "solved" immediately and uniquely at the use-occurrence.

This is true in the case of Ocaml structures. However, objects of a
sub-class will have inherited fields.  To my understanding, the use of
row-types here is similar to BitC's has-field constraint.

Swaroop.

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to