Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Yamagata Yoriyuki <yoriyuki@m...>
Subject: Re: [Caml-list] Delegation based OO
From: Alex Baretta <alex@baretta.com>
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
   ...
end

"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
an_object?

But you know something I do not aware?

-------------------
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