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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-10 (21:35)
From: Martin Jambon <martin.jambon@e...>
Subject: Re: [Caml-list] Read-only arrays ?
On Tue, 10 Apr 2007, David Teller wrote:

> 	Hi everyone,
>   Is there a simple manner of providing read-only/write-only arrays ? I
> was hoping that a simple hack using co-variance or contra-variance would
> work, but, well, after a few minutes of thought, turns out that it
> doesn't.

This topic comes up from time to time... My take on this is that read-only
arrays or strings are not badly needed.

I wrote this small interface for R/W/RW strings last year, for fun; I
don't use it at all:


Martin Jambon