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-05 (02:49)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Strings
On Saturday 04 April 2009 22:51:50 Goswin von Brederlow wrote:
> The beauty of ocaml strings is that they are really compact. An ocaml
> string on 32bit is 5-8 bytes longer than the contained string and 9-16
> bytes on 64bit.

The ugliness is that 16Mb limit. I assume those limits have been removed in 

> As for char lists for strings you can always convert strings to char
> lists when that is a better representation.

I would rather use a view pattern to create substrings efficiently.

Dr Jon Harrop, Flying Frog Consultancy Ltd.