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
[Caml-list] Delegation based OO
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-03-22 (23:02)
From: Yamagata Yoriyuki <yoriyuki@m...>
Subject: Re: [Caml-list] Delegation based OO
From: Alex Baretta <>
Subject: [Caml-list] Delegation based OO
Date: Mon, 22 Mar 2004 11:18:05 +0100

> This is really a pain. I would expect delegation to be supported in the 
> coolest OO language under the sun ;)

As far as I know, type theory for object-based OO is still
on-going research topic.

In your example,

class *type* does_something = object ... end

class does_more (an_object:#does_something) = object
   delegates an_object

"an_object" may have a method, say, "an_object#foo : int".
"does_more" could overwrite the method, and define "does_more#foo :
float".  Now, what type should "self#pooh" have in the definition of

But you know something I do not aware?

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: