Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

http://caml.inria.fr/pub/ml-archives/caml-list/2006/05/b34caf7bc9a5b651e91706392de65845.en.html

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

http://martin.jambon.free.fr/ocaml.html#gstring


Martin

--
Martin Jambon
http://martin.jambon.free.fr