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 822A1BB83 for ; Thu, 25 May 2006 12:15:21 +0200 (CEST) Received: from pih-relay06.plus.net (pih-relay06.plus.net [212.159.14.133]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4PAFKfn016674 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 25 May 2006 12:15:21 +0200 Received: from [80.229.56.224] (helo=chetara) by pih-relay06.plus.net with esmtp (Exim) id 1FjCsC-0003OH-BX for caml-list@yquem.inria.fr; Thu, 25 May 2006 11:15:20 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: immutable strings (Re: Array 4 MB size limit) Date: Thu, 25 May 2006 11:22:23 +0100 User-Agent: KMail/1.9.1 References: <20060515141230.ajyupn2z28k0484s@horde.akalin.cx> <77959C0C-D878-412A-A1A3-3C9D382EDB93@conjury.org> In-Reply-To: <77959C0C-D878-412A-A1A3-3C9D382EDB93@conjury.org> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605251122.24472.jon@ffconsultancy.com> X-Miltered: at concorde with ID 447583B8.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; woodyatt:01 mutable:01 variants:01 mutation:01 runtime:01 ocaml:01 2006:98 23,:98 frog:98 wrote:01 caml-list:01 exception:01 typing:01 functions:01 functions:01 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 Thursday 25 May 2006 08:23, j h woodyatt wrote: > Change the way strings are boxed so that there is an additional tag > for immutable strings as opposed to the normal mutable ones. In all > respects, allow string objects with either tag to be treated the same > by functions that do not modify the content of the string. When the > "safe" variants of the string mutation functions are called on a > string object with the immutable tag, throw a runtime exception. Blech. I didn't come all this way for dynamic typing... ;-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists