English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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

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