Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Classes and marshaling
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Frederic Tronel <Frederic.Tronel@i...>
Subject: Re: [Caml-list] Classes and marshaling
Frederic Tronel wrote:
> 
> Is it possible to serialize an object ??
> In the toplevel:
> 
>         Objective Caml version 3.04
> 
> #  open Marshal ;;
> #  class a = object end ;;
> class a : object  end
> #  to_string (new a) [] ;;
> Exception: Invalid_argument "output_value: object value".
> #
> 
> Best regards,
> 
> Frederic Tronel.
> -------------------
> Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
> To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr

After having taken a look at the source code (byterun/extern.c), it
seems that 
caml value tagged with Object_tag (that is object) are simply ignored
(an
exception is raised). 

Is there any chance to see object serialization being implemented in the
near future ??
By the way I did not find any reference about this problem in the
documentation
(in the book by chailloux, manoury and pagano, they mention that
abstract
types cannot be serialized, but it seems they do not mention objects).

Best regards,

Frederic Tronel.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr