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
Internals details for
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-12-23 (16:37)
From: John Prevost <prevost@m...>
Subject: Re: Internals details for
Jerome Vouillon <> writes:

> You could also probably make the permission check only once, when the
> region is created, and use the type system to enforce safety.  For
> instance, the interface could look something like this:
>     type 'a perms
>     type 'a t
>     val read_only : <read:unit> perms
>     val write_only : <write:unit> perms
>     val read_write : <read:unit;write:unit> perms

Oho!  Nice trick.  I'd thought of using the type system, but it hadn't
occurred to me that I could use object types in such a nefarious way!