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
Class/prototype-based OO
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-29 (17:56)
From: Ted Kremenek <kremenek@c...>
Subject: Re: [Caml-list] Class/prototype-based OO

On Aug 29, 2006, at 5:03 AM, Gerd Stolpmann wrote:

> In theory, RTTI is possible in O'Caml. But it is very costly: Object
> types are complex structures and not only names. So any downcast would
> be a very expensive operation (a full type check).

Of course, but this cost would only be incurred during the downcast.   
Thus people who do not need to use the operation will not pay for  
it.  Of course, the RTTI information comes with a space cost.