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 SAA29762; Fri, 31 May 2002 18:19:04 +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 SAA29708 for ; Fri, 31 May 2002 18:19:03 +0200 (MET DST) Received: from abel (nat.umh.ac.be [193.190.193.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4VGJ2523466 for ; Fri, 31 May 2002 18:19:02 +0200 (MET DST) Received: from abel ([127.0.0.1] helo=localhost ident=trch) by abel with esmtp (Exim 3.35 #1 (Debian)) id 17Dp7p-0004XC-00; Fri, 31 May 2002 18:19:37 +0200 Date: Fri, 31 May 2002 18:19:36 +0200 (CEST) Message-Id: <20020531.181936.55316303.debian00@tiscalinet.be> To: garrigue@kurims.kyoto-u.ac.jp Cc: warplayer@free.fr, caml-list@inria.fr Subject: Re: [Caml-list] about Obj.magic From: Christophe TROESTLER In-Reply-To: <20020531225840C.garrigue@kurims.kyoto-u.ac.jp> References: <003601c20884$0d78efd0$7900a8c0@warp> <20020531225840C.garrigue@kurims.kyoto-u.ac.jp> X-Spook: Firewalls Jiang Zemin Firefly afsatcom CID condor Albania security anarchy UFO X-Mailer-URL: http://www.mew.org/ X-Operating-System: GNU/Linux (http://www.linux.org/) X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Mailer: Mew version 2.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 31 May 2002, Jacques Garrigue wrote: > > From: "Warp" > > > > So, we should be very careful to use 'Obj.magic'. Can somebody tell me > > > the appropriate situation to use this function? > > > > One case can be 'almost-legal' : downcasting an object [...] > > By the way, here is a simple way to do downcasts, when really > needed. [...] No need to do anything unsafe. Is there any safe way to check whether a "kind : ('a, 'b) Bigarray.kind" parameter is "float64", "complex64",... or are we bound to do kind = (Obj.magic float64 : ('a, 'b) Bigarray.kind) Cheers, 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