Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] does class polymorphism need to be so complicated?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: RE: [Caml-list] does class polymorphism need to be so complicated?
From: "Jacques Carette" <carette@mcmaster.ca>

> > The extension of Brian's code to rows with more than one field is obvious 
> > though, isn't it? 
> 
> Indeed - but that rather begs the question of why are classes and rows
> different, as they (naively perhaps) seem so ripe for 'unification'.
> 
> The work on dependent records in Coq seems highly related (and looks quite
> successful, at least in the context of the FOC project).

I'm not sure of what you mean by rows.
At least, in the above examples, rows were used as a name for object
types.
And a class type is just an object type plus a bit more information.
In that respect, I would say they are one and the same thing, and
there is no unification needed.
  class type printable = object method print : unit end
also defines the type
  type printable = < print : unit >
Of course there could be a discussion on whether we really need class
types, or whether classes should define a class type or not, etc...

Jacques Garrigue

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners