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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id CA9CEBDDB for ; Sat, 3 Sep 2005 14:14:45 +0200 (CEST) Received: from smtp10.wanadoo.fr (smtp10.wanadoo.fr [193.252.22.21]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j83CEjhF001369 for ; Sat, 3 Sep 2005 14:14:45 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1002.wanadoo.fr (SMTP Server) with ESMTP id 6DEB024000B4 for ; Sat, 3 Sep 2005 14:14:45 +0200 (CEST) Received: from [81.53.197.199] (ANantes-154-1-42-199.w81-53.abo.wanadoo.fr [81.53.197.199]) by mwinf1002.wanadoo.fr (SMTP Server) with ESMTP id 0D62F24000A9; Sat, 3 Sep 2005 14:14:44 +0200 (CEST) X-ME-UUID: 20050903121445549.0D62F24000A9@mwinf1002.wanadoo.fr In-Reply-To: <87y86elcb2.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> 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 14:07:22 +0200 To: Florian Weimer X-Mailer: Apple Mail (2.728) X-Miltered: at nez-perce with ID 431993B5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 florian:01 damien:01 caml-list:01 beginner's:01 ocaml:01 beginners:01 bug:01 wrote:01 arbitrary:01 typing:01 functions:01 bin:01 unsafe:01 unsafe:01 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 11:40, Florian Weimer wrote: > * Damien Bobillot: > > >>> The C language interface falls into this category. Are there any >>> other problematic areas? >>> >> >> The Obj.magic function. I don't know exactly what it does, but I >> think it does arbitrary type conversions. >> > > 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. 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). > > I discovered that there are also a couple of undocumented unsafe_* > functions, such as String.unsafe_set, which behave the way their names > imply (no bound schecks). > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > >