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 GAA14639; Fri, 31 May 2002 06:00:29 +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 GAA14243 for ; Fri, 31 May 2002 06:00:29 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4V40S518272 for ; Fri, 31 May 2002 06:00:28 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id GAA31883 for caml-list@inria.fr; Fri, 31 May 2002 06:00:28 +0200 Date: Fri, 31 May 2002 06:00:28 +0200 From: Daniel de Rauglaudre To: Ocaml Subject: Re: [Caml-list] about Obj.magic Message-ID: <20020531060028.A31866@verdot.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from zhudp@cs.bu.edu on Thu, May 30, 2002 at 05:09:43PM -0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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