comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: why access parameter in stream attributes to begin with, instead of in or in/out ?
Date: Mon, 11 Jun 2018 18:17:16 -0500
Date: 2018-06-11T18:17:16-05:00	[thread overview]
Message-ID: <pfmvts$k62$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: cb1b3f8b-bf3b-4768-99af-5575a55cf682@googlegroups.com

"Shark8" <onewingedshark@gmail.com> wrote in message 
news:cb1b3f8b-bf3b-4768-99af-5575a55cf682@googlegroups.com...
> On Monday, June 11, 2018 at 3:49:28 PM UTC-6, Mehdi Saada wrote:
>> Hi.
>>
>> I wondered why in Ichibiah's design, in the beginning, stream have been 
>> made to work with access types/access parameters ?
> Hard to say; his design [Ada83] didn't have streams.

Right, streams were an Ada 95 feature.

>> I could have imagined that the attributes would work with a in/out stream 
>> parameter, and stream(blabla) would give an object of stream type.
>> I don't know if storing streams' access values for later use is common, 
>> one would just have to add .all when appropriate...
> Good questions, I want to say it's not common to pop access-type via 
> streams, but maybe I'm just unadventurous.

Ada 83/95/2005 do not allow functions to have parameters that are out or in 
out. "access" was (mistakenly) thought to be a work-around for that. 
Streams, being an Ada 95 feature, used that work-around. It used it 
consistently, I suppose so that all of the stream attributes would work the 
same (it would be weird for Input and Read to work differently - remember, 
Input is a function and has to be one since the result in unconstrained).

                                          Randy.



  reply	other threads:[~2018-06-11 23:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11 21:49 why access parameter in stream attributes to begin with, instead of in or in/out ? Mehdi Saada
2018-06-11 22:48 ` Shark8
2018-06-11 23:17   ` Randy Brukardt [this message]
2018-06-12  6:28 ` Mehdi Saada
2018-06-12  8:30   ` Dmitry A. Kazakov
replies disabled

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