Browse thread
Strings
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-04-03 (20:34) |
From: | Arnaud Spiwack <Arnaud.Spiwack@l...> |
Subject: | Re: [Caml-list] Strings |
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 > >