From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 13390BBCA for ; Sat, 26 Apr 2008 08:44:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqcBANNrEkjAXQIniGdsb2JhbACBU5AIAQEBDyCZHw X-IronPort-AV: E=Sophos;i="4.25,710,1199660400"; d="scan'208";a="11475226" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 26 Apr 2008 08:44:30 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m3Q6iUx9029461 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 26 Apr 2008 08:44:30 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqwHANNrEkg+BBBpZGdsb2JhbACBU497HwIhmRw X-IronPort-AV: E=Sophos;i="4.25,710,1199660400"; d="scan'208";a="10086228" Received: from smtp-105-friday.nerim.net (HELO kraid.nerim.net) ([62.4.16.105]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 Apr 2008 08:44:30 +0200 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by kraid.nerim.net (Postfix) with ESMTP id BE02DCF095; Sat, 26 Apr 2008 08:44:29 +0200 (CEST) Received: from [192.168.0.1] (glinka.lesours [192.168.0.1]) by hector.lesours (Postfix) with ESMTP id 983F220F0FE; Sat, 26 Apr 2008 08:43:42 +0200 (CEST) Message-ID: <4812CF76.9050706@starynkevitch.net> Date: Sat, 26 Apr 2008 08:45:10 +0200 From: Basile STARYNKEVITCH User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080420) MIME-Version: 1.0 To: Jacques Le Normand Cc: caml-list@inria.fr Subject: Re: [Caml-list] marshalling objects References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4812CF4E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; basile:01 basile:01 marshalling:01 foo:01 foo:01 marshalling:01 faiencerie:01 92340:01 reine:01 closures:01 wrote:01 caml-list:01 functions:01 marshal:01 marshal:01 Jacques Le Normand wrote: > hello caml list, > if I marshal an object of class c and I write the result in a file > foo.txt and, later on, I add methods to c, can I read the object in > foo.txt and call the new methods on the object? First, a *.txt extension for a binary file (written thru Marshal.* functions) is very confusing. Second, marshalling of any closures (including methods shared by objects) can only be unmarshalled by the exact same binary. So if you add/change code, it should not work. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***