Version française
Home     About     Download     Resources     Contact us    
Browse thread
Not really a bug but...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <Alain.Frisch@i...>
Subject: Re: [Caml-list] Not really a bug but...
Jon Harrop wrote:
> Any chance of changing the semantics of string literals so they aren't static?

A simple Camlp4 syntax extension is enough to turn any literal "foobar"
into String.copy "foobar". (Except it doesn't work because of format
strings.)  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.

-- Alain