Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Marshalling objects (was: French interactive fiction, anyone ?)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christopher Quinn <cq@h...>
Subject: Re: [Caml-list] Marshalling objects (was: French interactive fiction, anyone ?)
Jacques Garrigue wrote:
> Actually I cannot remember any such reason.
> I actually tried, just commenting out the Object_tag case in
> byterun/extern.c, and it works!
> There's a single glitch: as it just handles objects as normal data,
> oid's are not updated. This means that equality on objects (which is
> oid based) will be incorrect.
> Can somebody comment about other possible problems?
> I join some test code at the end of this mail, to run after commenting
> out Object_tag.
> 
> On the other hand, objects are not just closures, and it would be nice
> to be able to serialize their data in a code-independent way. Not so
> unreasonable: class names are unique. This would require a bit of
> runtime support, to be able to retrieve method tables.
> 

Is not Field(obj,0) still a *pointer* to a double hash table, and so 
unique to a particular compilation?
I have a crummy type reflection module which exports this pointer so 
that by comparison of types at runtime an imported object created under 
another program can be amended with the current version of this pointer.
I have a vague memory that reflection is a theoretical no-go for ML. Is 
this true?

- chris

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