From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA32658; Thu, 20 Jun 2002 09:15:57 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA00033 for ; Thu, 20 Jun 2002 09:15:56 +0200 (MET DST) Received: from t2.fast.net.uk (ns1.fast.net.uk [212.42.162.2]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g5K7Ft506001 for ; Thu, 20 Jun 2002 09:15:55 +0200 (MET DST) Received: from htec.demon.co.uk ([212.42.169.63]) by t2.fast.net.uk (8.11.6/8.11.4) with ESMTP id g5K7FgE71478; Thu, 20 Jun 2002 08:15:43 +0100 (BST) Message-ID: <3D118137.5020007@htec.demon.co.uk> Date: Thu, 20 Jun 2002 08:16:07 +0100 From: Christopher Quinn User-Agent: Mozilla/5.0 (compatible; MSIE5.5; Windows 98; X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jacques Garrigue CC: berke@altern.org, caml-list@inria.fr Subject: Re: [Caml-list] Marshalling objects (was: French interactive fiction, anyone ?) References: <20020617233800.C16032@gogol.zorgol> <20020618065723.GJ4232@alan-schm1p> <20020619175654.A14466@gogol.zorgol> <20020620140857P.garrigue@kurims.kyoto-u.ac.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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