Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Width subtyping
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-05-29 (15:45)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Width subtyping


> The dual of sums is products.  Open (labelled) sums
> are "polymorphic variants".  Their duals are open
> (labelled) products are "rows" (which O'Caml already
> supports, through its objects).

Yes, as I mentioned, for some classes of this particular problem the object
system can be put to good use -- when there is a clear tree for inheritance,
for example.  Unfortunately that is always not the case; there are problems
where you would end up with a tangled web of multiple inheritances just for
the sake of avoiding duplicating methods.