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