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=1.7 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 7ADFEBBC4 for ; Fri, 3 Apr 2009 22:34:39 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag8CAFsP1klIDtybjWdsb2JhbACVZD8BAQEBCQkKCQ8FqBaQMgEDAQOEDAaGCg X-IronPort-AV: E=Sophos;i="4.39,321,1235948400"; d="scan'208";a="37825000" Received: from fg-out-1718.google.com ([72.14.220.155]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Apr 2009 22:34:39 +0200 Received: by fg-out-1718.google.com with SMTP id 19so524100fgg.20 for ; Fri, 03 Apr 2009 13:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=odL2pr1Bw4w+EU4RMGJGpqgqzNDN09KYsY7oTxDbTXA=; b=RT86M4iT5gDoxkL84jrgPDvguSxuxnF42Er2PxNFh332O17m0qsFm1YzTYWzIApJBl zX7uYSLeO7UEzxGP5l72XuS/qN3GScd5xp5wUz3c05113v5qWqNZREyyOuT6HpHDHph6 8sLAqlAlGYVOdLyhUloI/etGmpxlU4mJ3hsKw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=PISQ4pvpHUTPQsnytRDCbN0SqneHwHscJUD8MyMZFDSwah71oIo7SJeOmobfK8KY2v DZr4pvAWjnhfVOaXxozPqV3RAjaloy1aVDc1jse2qy6wcoSzMZukAHItxrqAD8+jIAM9 PoKQY3m2aidUKdrWRYhedgUP1NyO+gyppSr5g= Received: by 10.86.94.11 with SMTP id r11mr1311434fgb.53.1238790878443; Fri, 03 Apr 2009 13:34:38 -0700 (PDT) Received: from ?192.168.0.124? (bur91-1-87-88-165-197.dsl.club-internet.fr [87.88.165.197]) by mx.google.com with ESMTPS id 12sm9413847fgg.12.2009.04.03.13.34.37 (version=SSLv3 cipher=RC4-MD5); Fri, 03 Apr 2009 13:34:37 -0700 (PDT) Sender: Arnaud Spiwack Message-ID: <49D672DC.5030201@lix.polytechnique.fr> Date: Fri, 03 Apr 2009 22:34:36 +0200 From: Arnaud Spiwack User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Martin Jambon Cc: =?ISO-8859-1?Q?Daniel_B=FCnzli?= , OCaml List Subject: Re: [Caml-list] Strings References: <200904031256.33357.jon@ffconsultancy.com> <200904031546.14071.jon@ffconsultancy.com> <49D63EE6.2020407@ens-lyon.org> In-Reply-To: <49D63EE6.2020407@ens-lyon.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; lix:01 mutable:01 mutable:01 syntax:01 ocaml's:01 char:01 arnaud:01 arnaud:01 integer:01 caml-list:01 immutable:01 immutable:01 strings:01 strings:01 jambon:01 If my experience is worth anything, I've had hardly any use of mutable character strings. Many of immutable ones. The practical advantage of having immutable character strings is the same as that of having immutable integer data : when you do not need to mutate data of a type, you'd better keep this type immutable (also internal representation of the type might very well vary seriously depending on it being mutable or not). Notice that with pa_do, I guess I can now define easily this type while using a string syntax for them (which is good). Thus Arnaud Spiwack Martin Jambon a écrit : > I love this recurrent discussion! > > Here is my firm point of view which hasn't changed over the years and hundreds > of millions documents processed: > > - I see absolutely no practical advantage of having an immutable "character > string" type. > > - There is nothing to change in OCaml's string type because it is an "array of > bytes", with type char representing single bytes. > > > > > Martin > >