From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 0DBE0BBAF for ; Sun, 5 Apr 2009 09:05:23 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar4AAEL110nUnwdjjWdsb2JhbACCIZQFAQEBAQkJCgkPBrMYhA8G X-IronPort-AV: E=Sophos;i="4.39,325,1235948400"; d="scan'208";a="25659092" Received: from relay.pcl-ipout01.plus.net ([212.159.7.99]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Apr 2009 09:05:22 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAHb110nUnw4U/2dsb2JhbACCIcdchA8G Received: from pih-relay08.plus.net ([212.159.14.20]) by relay.pcl-ipout01.plus.net with ESMTP; 05 Apr 2009 08:05:22 +0100 Received: from [87.112.64.35] (helo=leper.local) by pih-relay08.plus.net with esmtp (Exim) id 1LqMPx-0000dm-US for caml-list@yquem.inria.fr; Sun, 05 Apr 2009 08:05:22 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Strings Date: Sun, 5 Apr 2009 08:11:43 +0100 User-Agent: KMail/1.9.9 References: <200904031256.33357.jon@ffconsultancy.com> <200904050355.31170.jon@ffconsultancy.com> <87ws9zfuyz.fsf@frosties.localdomain> In-Reply-To: <87ws9zfuyz.fsf@frosties.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904050811.43774.jon@ffconsultancy.com> X-Plusnet-Relay: 73a5b240202df4dafd56db42d0578afc X-Spam: no; 0.00; ocaml:01 ocaml:01 ugliness:01 byte:01 2009:98 2009:98 frog:98 polymorphic:01 wrote:01 wrote:01 caml-list:01 writes:01 strings:01 strings:01 string:02 On Sunday 05 April 2009 07:57:56 Goswin von Brederlow wrote: > Jon Harrop writes: > > On Saturday 04 April 2009 22:51:50 Goswin von Brederlow wrote: > >> The beauty of ocaml strings is that they are really compact. An ocaml > >> string on 32bit is 5-8 bytes longer than the contained string and 9-16 > >> bytes on 64bit. > > > > The ugliness is that 16Mb limit. I assume those limits have been removed > > in batteries?! > > As that is a limitation of the GC memory structure of a string there > is nothing batteries can do there. Not for the basic type string. It > is also just 32bit that is so severly limited. Batteries could replace all uses of the built-in string type with another type, such as a byte big array, just as they have done to implement ropes. I don't think they could address the array limitation though, because that is polymorphic. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e