Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

why are record labels not record scoped?

0 views
Skip to first unread message

Henry Bigelow

unread,
Jun 17, 2006, 5:52:20 PM6/17/06
to
hi,
this is a theoretical question mostly. i was wondering why ocaml
doesn't allow to define, say:

type a = { i : int; f : float; }
type b = { i : int; }

i've read a few faqs, but none that explains

i remember reading the explanation that ocaml would then have no way to
disambiguate type a and b during type inference, as in:

let c t = t.i

but, why shouldn't type inference be able to handle it, as in:

val c : (a or b) -> int

in other words, since full polymorphism is handled so well in ocaml,
why not "partial polymorphism"?

thanks in advance,

henry

0 new messages