Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Stop at exception
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Rogoff <bpr@b...>
Subject: Re: [Caml-list] Non-mutable strings
On Thu, 10 Jan 2002, Patrick M Doane wrote:
> On Thu, 10 Jan 2002, Xavier Leroy wrote:
>
> > If we were to start again from scratch, I'd consider immutable strings
> > seriously.  Having mutable strings is handy when they are used as
> > character buffers, e.g. by low-level I/O functions.  But I agree there
> > are advantages to distinguish (immutable) strings and (mutable)
> > character buffers.
>
> In some situations, I've been able to simply make an immutable replacement
> for the String module:
>
> module String = struct
> [...snip...]
>   (* .. *)
> end

Sure, that works, but I think if the Caml community really wants immutable
strings (and it seems that quite a few people do) it might make sense to
try some alternative implementations, like ropes. It was mentioned on
this list that some older version of Caml used ropes; maybe they could be
resurrected?

-- Brian
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr