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
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-04-04 (11:12)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] Strings
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.


On Sat, 2009-04-04 at 11:11 +0100, Jon Harrop wrote:
> Why? This data structure is a mutable array of bytes and should be treated as 
> such.