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
Objects, dynamic cast, Obj.magic abuse and dragons
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-02-29 (12:27)
From: Tiphaine.Turpin <Tiphaine.Turpin@f...>
Subject: Re: [Caml-list] Objects, dynamic cast, Obj.magic abuse and dragons
Berke Durak a écrit :
> Tiphaine.Turpin a écrit :
>> Here is another try. it has the drawback that classes need to be 
>> parametric, but it seems to work, and to be scalable (the added code 
>> is always the same). Of course, some syntactic sugar would help.
> That seems to be a very good solution!  I didn't think it was possible.
> The classes are parametric but there is only one parameter, right?
Yes (but you may want to add your own parameters for other purposes). 
However, since there is a single tag for each classes, if you use a 
parameterized class with different arguments in the same context, you 
can probably have typing problems...

Tiphaine Turpin