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
native values in objects from c
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-31 (08:23)
From: Michael Wohlwend <micha-1@f...>
Subject: Re: [Caml-list] native values in objects from c

-------- Original-Nachricht --------
Datum: Thu, 31 Aug 2006 15:55:12 +0900 (JST)
Von: Jacques Garrigue <>
Betreff: Re: [Caml-list] native values in objects from c

> Aargh, you're right. The behaviour changed between 3.08 and 3.09.
> In 3.08, fields are still ordered in definition order, including
> inherited ones, but in 3.09, due to an optimization, inherited fields
> appear after newly defined ones. The trouble is that this being due
> to an optimization, this may change again, so it is not a good idea to
> depend on it.

o.k., accessing the field from c allready seemed hacky to me :-)

> A better approach it to add a method which returns the field with an
> abstract type, this way users cannot break the type system.

o.k., seems indeed the safer way.



Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: