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 D7F8DBB81 for ; Mon, 28 Nov 2005 22:30:34 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jASLUYHQ007883 for ; Mon, 28 Nov 2005 22:30:34 +0100 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 WAA25792 for ; Mon, 28 Nov 2005 22:30:33 +0100 (MET) Received: from mail.physik.uni-muenchen.de (mail.physik.uni-muenchen.de [192.54.42.129]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jASLUWsf007874 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 28 Nov 2005 22:30:33 +0100 Received: from localhost (unknown [127.0.0.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 41C1620022; Mon, 28 Nov 2005 22:30:32 +0100 (CET) Received: from mail.physik.uni-muenchen.de ([127.0.0.1]) by localhost (mail.physik.uni-muenchen.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32259-01-39; Mon, 28 Nov 2005 22:30:32 +0100 (CET) Received: from mailhost.cip.physik.uni-muenchen.de (kaiser.cip.physik.uni-muenchen.de [141.84.136.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 285E620011; Mon, 28 Nov 2005 22:30:32 +0100 (CET) Received: from eiger.cip.physik.uni-muenchen.de (eiger.cip.physik.uni-muenchen.de [141.84.136.54]) by mailhost.cip.physik.uni-muenchen.de (Postfix) with ESMTP id C42E126E87; Mon, 28 Nov 2005 22:30:31 +0100 (CET) Received: by eiger.cip.physik.uni-muenchen.de (Postfix, from userid 3092) id 95E1D34FFF; Mon, 28 Nov 2005 22:30:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by eiger.cip.physik.uni-muenchen.de (Postfix) with ESMTP id 8C5BC220C4; Mon, 28 Nov 2005 22:30:31 +0100 (CET) Date: Mon, 28 Nov 2005 22:30:31 +0100 (CET) From: Thomas Fischbacher To: Dmitry Bely Cc: caml-list@inria.fr Subject: Re: [Caml-list] Bigarray question In-Reply-To: Message-ID: References: X-BOFH: Daemons did it MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at physik.uni-muenchen.de X-Miltered: at concorde with ID 438B76FA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 438B76F8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 bigarray:01 bigarray:01 val:01 pointer:01 val:01 cip:98 cip:98 lambda:01 lambda:01 wrote:01 dmitry:01 explicitly:01 unsafe:01 bely:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Mon, 28 Nov 2005, Dmitry Bely wrote: > 1. For the current implementation it's safe (use Data_bigarray_val(v) to > change the data pointer). I don't see any reason why it could become unsafe. > 2. It is up to you whether to use this feature or not. I will neither use undocumented programming techniques, nor recommend doing so to other programmers, no matter what kind of language. That would - quite in general - be a very bad habit that eventually must lead to bugs that are hard to impossible to diagnose and debug. Assigning to Data_bigarray_val is not explicitly permitted. Nevertheless, being allowed to do so would be helpful. So, a simple change to the documentation would suffice to make me happy. -- regards, tf@cip.physik.uni-muenchen.de (o_ Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)