Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] about Obj.magic
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] about Obj.magic
Hi,

On Thu, May 30, 2002 at 05:09:43PM -0400, dengping zhu wrote:

> When should I use 'Obj.magic'? It is really confusing. Now I am
> converting a bunch of code from sml to ocaml. [...]

About conversion from SML into OCaml, I may help: these days, I am
trying to convert a program of 70000 lines of SML into OCaml, using
Camlp4. Please ask me if you want more details.

About examples of use Obj.magic, there are the extensible grammars of
Camlp4, and in particular the EXTEND function. I can explain here if
people are interested. And I know that the OCaml toplevel program uses
it also.

In general, like Jacques Garrigue said, don't use Obj.magic if you are
not *absolutely* sure of what you do.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
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