comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <spamoff.danx@ntlworld.com>
Subject: Re: How to?  Writeable from a readable?
Date: Mon, 06 Jan 2003 09:25:39 +0000
Date: 2003-01-06T09:25:39+00:00	[thread overview]
Message-ID: <ZUbS9.46$lr2.14259@newsfep1-gui.server.ntli.net> (raw)
In-Reply-To: <C9F9D2CF8A01B25A.0CF5491BB5F2FD44.FFBD43EB41FDE43E@lp.airnews.net>

John R. Strohm wrote:
> Maybe I'm way out in left field here.
> 
> In capability-based operating system terms, it sounds as though you are
> trying to take a read-only capability and amplify it into a read-write
> capability.  Every capability system I ever saw was specifically designed to
> prevent you from doing precisely that: if the owner of the object wanted you
> to have read-write access to the, he would have granted you a read-write
> capability for the object in the first place.
> 
> What I think you want to do is go back to the original system, structure it
> as a read-write object, and then make a read-only view of it that you give
> out to the world.  Only the ones who really have a legitimate need for
> read-write access get the read-write capability.

That was my first idea, but since it will be OO the read only view of 
the data would inherit the operations of the read-write view and so the 
client would be able to modify the read-only raster - unless the 
operations where overridden to throw an exception, but I'd think that'd 
be a bad design choice in this instance.

What I'm considering is

Raster is abstract tagged ...;

Read_Only_Raster is new Raster with tagged ...;

Write_Read_Raster is new Raster with tagged ...;

That would enable the client to use a read_only_raster or 
write_read_raster wherever they could use a raster.


Chris
-- 
for personal replies change spamoff to chris




  reply	other threads:[~2003-01-06  9:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-05 23:09 OO: How to? Writeable from a readable? chris.danx
2003-01-05 23:40 ` tmoran
2003-01-06  3:39 ` John R. Strohm
2003-01-06  9:25   ` chris.danx [this message]
2003-01-06 18:00 ` OO: " Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox