From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 61D61BDDB for ; Sat, 3 Sep 2005 16:42:51 +0200 (CEST) Received: from smtp6.wanadoo.fr (smtp6.wanadoo.fr [193.252.22.25]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j83Egpch008912 for ; Sat, 3 Sep 2005 16:42:51 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0602.wanadoo.fr (SMTP Server) with ESMTP id 07A0B1C000BD for ; Sat, 3 Sep 2005 16:42:51 +0200 (CEST) Received: from [81.53.215.171] (ANantes-154-1-60-171.w81-53.abo.wanadoo.fr [81.53.215.171]) by mwinf0602.wanadoo.fr (SMTP Server) with ESMTP id 99F691C0009C; Sat, 3 Sep 2005 16:42:50 +0200 (CEST) X-ME-UUID: 20050903144250630.99F691C0009C@mwinf0602.wanadoo.fr In-Reply-To: <87slwmjkdx.fsf@mid.deneb.enyo.de> References: <87slwny8xs.fsf@mid.deneb.enyo.de> <2D13837B-0BDC-4E14-86DE-ADCCE2E3BC78@m4x.org> <87y86elcb2.fsf@mid.deneb.enyo.de> <87slwmjkdx.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 (Apple Message framework v728) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Damien Bobillot , caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: yoann padioleau Subject: Re: [Caml-list] Unsafe features Date: Sat, 3 Sep 2005 16:35:26 +0200 To: Florian Weimer X-Mailer: Apple Mail (2.728) X-Miltered: at concorde with ID 4319B66B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 florian:01 ocaml:01 wrote:01 typing:01 define:01 unsafe:01 unsafe:01 guess:02 external:02 xavier:06 cast:07 leroy:07 creates:07 apparently:07 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS autolearn=disabled version=3.0.3 On 3 sept. 05, at 16:28, Florian Weimer wrote: > * yoann padioleau: > > >>> Apparently, it creates a bit-wise copy of a value and assigns it >>> a new >>> type. >>> >> >> Are you sure ? I thought it was just a function to get rid temporary >> of the typing system, a kind of cast operator. >> > > It is, but how would you define such a operator? obj.ml contains: external magic: 'a -> 'b = "%identity" So I guess there is no bit-wise copy involved. > > >> But is is bad to use it, very bad, shame on you if you use it >> (i just put this statement to be sure that xavier leroy will not >> shout over me). >> > > Yes, and my question was to avoid such unsafe language features. > I know :) It is just that I have the feeling that the ocaml team does not like when someone talk about Obj.magic, so I put a disclaimer. >