English version
Accueil     Ŕ propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis ŕ jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml ŕ l'adresse ocaml.org.

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:34)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Strings
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.

Dr Jon Harrop, Flying Frog Consultancy Ltd.