From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news.netfront.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ada advocacy Date: Thu, 29 Aug 2013 14:43:30 -0700 Organization: Netfront http://www.netfront.net/ Message-ID: References: <19595886.4450.1332248078686.JavaMail.geo-discussion-forums@vbbfy7> <2012032020582259520-rblove@airmailnet> <12ee9bc5-3bdf-4ac0-b805-5f10b3859ff4@googlegroups.com> <6c58fae4-6c34-4d7a-ab71-e857e55897c0@x6g2000vbj.googlegroups.com> NNTP-Posting-Host: 172.242.59.58 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1377812615 14060 172.242.59.58 (29 Aug 2013 21:43:35 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Thu, 29 Aug 2013 21:43:35 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:17041 Date: 2013-08-29T14:43:30-07:00 List-Id: On 08/29/2013 08:28 AM, Robert A Duff wrote: > > Also, you can do > multi-way waits with accept statements but not entry calls. You can do select P1.E1; -- An entry call. then abort P2.E4; -- Another entry call. end select; to wait for 1 of 2 entry calls, and you can nest another ATC in there to do 3, and so on to whatever depth you like, so I don't really see a reason for the language not to provide a multi-way select for entry calls. > It just feels wrong to me for that to be a task. It's not > really doing anything; it's just sitting around waiting > to be told what to do -- like a protected object. > The "do stuff" above is likely some simple action > like putting data in a queue or taking it out. > A protected object seems better for that -- perhaps it's > "lower level", but it's the RIGHT level. And with a protected > object, you don't need a 'terminate' alternative in this case > -- protected objects just go away like any passive object > (say, an integer). Sure. You should use a passive construct for a passive concept. One of Ada 83's problems was the lack of such a thing. Ada 95 added the protected object, which partially solves the problem; however, sometimes you need mutual exclusion for something that has to perform a potentially blocking action, and you can't use a protected object for that, so you're back to using a task for something passive. Some Ada-83 compilers, such as the DEC compiler, had "passive tasks", which were essentially protected objects without functions and without the restriction on what they could do. I think standardizing that concept would have been a better solution than introducing protected objects with their limitations. -- Jeff Carter "Now go away or I shall taunt you a second time." Monty Python and the Holy Grail --- news://freenews.netfront.net/ - complaints: news@netfront.net ---