comp.lang.ada
 help / color / mirror / Atom feed
From: hbaker@netcom.com (Henry Baker)
Subject: Re: Assignment of limited private types...
Date: Tue, 31 Jan 1995 01:05:39 GMT
Date: 1995-01-31T01:05:39+00:00	[thread overview]
Message-ID: <hbaker-3001951707580001@192.0.2.1> (raw)
In-Reply-To: 3gjce1$1he@theopolis.orl.mmc.com

In article <3gjce1$1he@theopolis.orl.mmc.com>, "Theodore E. Dennison"
<dennison@escmail.mmc.orl.com> wrote:

> stevem@dcs.gla.ac.uk (Steve McGowan) wrote:
> >
> > I'd like to pass in a 'file_type' identifier into a task, make a local
> > copy of this identifier within the task, and then write text to this
> > file stream inside the task.
> > But I cannot do this since 'file_type' is limited private.
> > Any ideas how I can pass in this identifier, and to write to it
> > locally?
> 
> The reason people make types "limited private" is so users CAN'T 
> make local copies of the objects. If the designer wanted you to
> be able to make copies of file_type objects, she would have made
> the type "private".

That may have been the original intent, but that isn't what Ada ended
up with.  What you describe requires a _read_ barrier, but Ada only
gives you a _write_ barrier.  Limited private types can't be assigned
to, but can easily be read from, and 'copies' made.

Put your WWW browser onto the following URL's for more background on limited
private types:

ftp://ftp.netcom.com/pub/hb/hbaker/LimitedRoots.html (or .ps.Z)
ftp://ftp.netcom.com/pub/hb/hbaker/LimitedRobbery.html (or .ps.Z)
ftp://ftp.netcom.com/pub/hb/hbaker/LPprogram.html (or .ps.Z)



  reply	other threads:[~1995-01-31  1:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-01-26 16:37 Assignment of limited private types Steve McGowan
1995-01-30 18:50 ` Theodore E. Dennison
1995-01-31  1:05   ` Henry Baker [this message]
1995-02-01 12:29   ` Robert Dewar
1995-02-07  2:23   ` Adam Beneschan
  -- strict thread matches above, loose matches on Subject: below --
1995-01-31  2:35 tmoran
replies disabled

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