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
Array 4 MB size limit
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-05-20 (18:32)
From: brogoff <brogoff@s...>
Subject: Re: [Caml-list] Array 4 MB size limit
On Fri, 19 May 2006, Brian Hurt wrote:
> On Fri, 19 May 2006, Jon Harrop wrote:
> > Agreed. Should OCaml's successor have extensible arrays with 64-bit lengths
> > and strings as char arrays?

Strings are random access character collections, so under the hood they might
be arrays, but I think mutable strings as the default string are a mistake.
One can imagine other representations for strings, like ropes. I'd like a
language to allow many different underlying string representations.

Extensible arrays are useful, but they're slower than fixed sized arrays, so
it would be best to provide both.

It would be better if there were no special behavior for float arrays. For
performance, monomorphic  FloatArray or even Float32Array, Float64Array,
etc., would be fine with me. And so would the same approach for strings
with different character types. It would get mildly annoying without
overloading, but maybe that would prompt the language designers to address
that issue.

> We I designing a language today, I'd have 63-bit array lengths- of course,
> I'd do it by not bothering to support 32-bit systems...

That would, even today, dramatically reduce the number of potential users
of your language.

> As for strings, I'd be inclined to make them immutable-

I strongly agree with that.

> the correct way to manipulate strings is with regular expressions.

But definitely not with that. REs have their place in the toolbox though.

-- Brian