[bitc-dev] Objects without subtypes
swaroop at cs.jhu.edu
Fri Oct 17 11:44:44 CDT 2008
Jonathan S. Shapiro wrote:
> In O'Caml, field names are not scoped by their structure type. They are
> global. In consequence, in the reference:
> 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.
More information about the bitc-dev