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.0 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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CF4DDBC0A for ; Sat, 16 Jun 2007 18:00:00 +0200 (CEST) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5GG00rN000861 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 16 Jun 2007 18:00:00 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1Hzagt-000493-00; Sat, 16 Jun 2007 16:59:55 +0100 Date: Sat, 16 Jun 2007 16:59:55 +0100 To: Loup Vaillant Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Not really a bug but... Message-ID: <20070616155955.GA15908@furbychan.cocan.org> References: <200706160117.45971.jon@ffconsultancy.com> <46739188.5060605@inria.fr> <6f9f8f4a0706160310m285f0b63r7e2087a31ae46671@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6f9f8f4a0706160310m285f0b63r7e2087a31ae46671@mail.gmail.com> User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at concorde with ID 46740900.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bug:01 0200,:01 frisch:01 frisch:01 semantics:01 literals:01 literals:01 abstractions:01 ocaml:01 mutable:01 usefull:01 mutable:01 bitfields:01 ioctl:01 wrote:01 On Sat, Jun 16, 2007 at 12:10:35PM +0200, Loup Vaillant wrote: > 2007/6/16, Alain Frisch : > >Jon Harrop wrote: > >> Any chance of changing the semantics of string literals so they aren't > >static? > >[...] > >If it were done automatically, there would be a penalty for > >the common case of immutable strings; to avoid it, you'd need to lift > >constant literals out of abstractions, which is not very nice. > > By the way, why Ocaml didn't take the Java path, i.e. making truly > immutable strings, And provide mutable string buffers as well? Any > chance of seing someone exploring that path? (Some usefull features > would then be fast consing and catenation, and some easier string > sharing). Mutable strings are useful! - I can use them as bitfields, general data areas (for ioctl, mlock), etc See: http://et.redhat.com/~rjones/hvcalls/ Rich. -- Richard Jones Red Hat