Re: Internals details for cmmgen.ml

From: John Prevost (prevost@maya.com)
Date: Thu Dec 23 1999 - 06:26:27 MET


To: Jerome Vouillon <Jerome.Vouillon@inria.fr>
Subject: Re: Internals details for cmmgen.ml
From: John Prevost <prevost@maya.com>
Date: 23 Dec 1999 00:26:27 -0500
In-Reply-To: Jerome Vouillon's message of "Sat, 18 Dec 1999 19:56:35 +0100"

Jerome Vouillon <Jerome.Vouillon@inria.fr> 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!
Nice!

John.



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:29 MET