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!newsfeed1.swip.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 08 Jul 2014 09:11:14 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Protected Type compiler complaint References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <53bb9990$0$6605$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 08 Jul 2014 09:11:12 CEST NNTP-Posting-Host: 058d3d65.newsspool4.arcor-online.net X-Trace: DXC=mVlnAgJS710^8FBo0_81f>4IUK;6PCY\c7>ejV8c0Vb`l7]mX=VB[DJYmdcY0 X-Complaints-To: usenet-abuse@arcor.de Xref: news.eternal-september.org comp.lang.ada:20793 Date: 2014-07-08T09:11:12+02:00 List-Id: On 07.07.14 21:06, framefritti wrote: > by its own nature a protected object acts as a communication mean between different tasks, so it is "natural" that it must be visible to "everyone" (although you could partially restrict its visibility by placing it inside a suitable child package). By the nature of communication, a protected object used as a means of communication just needs to be visible where needed. Its type may be more global. If tasks are started from within a subprogram doing auxiliary work not useful anywhere else, chances are that their definition profits from being local to the subprogram, possibly referring to local items. Then there is no need that some PO exist outside the subprogram: