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-04 (12:34) |
From: | David Rajchenbach-Teller <David.Teller@e...> |
Subject: | Re: [Caml-list] Strings |
On Sat, 2009-04-04 at 12:40 +0100, Jon Harrop wrote: > On Saturday 04 April 2009 12:12:52 David Teller wrote: > > The bad thing is that, whenever you have to return text in an otherwise > > functional program, you need to enter "mutable array of bytes" land. You > > can't just assume that the user isn't going to modify that string, > > because, they can, possibly by accident, and any invariant relying on > > the fact that your strings can't change are going to be broken. In > > particular, any StringSet, any StringMap, etc. > > Sure but that is no different to arrays and an ArraySet, ArrayMap etc. Of course. The thing is that when I'm using arrays, I'm expecting to enter mutable-land. When I'm manipulating text, most of the time, I don't. Cheers, David