Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
immutable Strings?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-03-14 (10:40)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] immutable Strings?
On Monday 14 March 2005 10:30, Pascal Zimmer wrote:
> The bad points:
> - you cannot use the shortcuts s.[i] and (^) anymore (this gets the code
> less readable especially for the first one)
> - you have to make a copy when creating an immutable string; if you were
> not planning to keep the original string to modify it, this copy is in
> fact useless

Do you not also lose the ability to do pattern matching and to use all of the 
existing string-based functionality (e.g. the Str module)?

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists