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!mx02.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: What is your opinion on Global Objects? Date: Wed, 19 Nov 2014 10:37:37 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 19 Nov 2014 17:37:26 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e1e8835fd7030ec2a5463beff662d0eb"; logging-data="18565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KoXvnqLK1YJoItUBbWFrhzwNq57kImUg=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: Cancel-Lock: sha1:H35Lt+Wzt8XF8RWZRjphwAjey+U= Xref: news.eternal-september.org comp.lang.ada:23554 Date: 2014-11-19T10:37:37-07:00 List-Id: On 11/19/2014 02:13 AM, Hubert wrote: > > Ok this is still an access of the global object directly from a subprogram. The > subprogram then accesses the variable with the data ijnternally which is the > same as accessing a global object. The data object itself is not passed through > the parameters of the subprogram that uses it. The package represents the object ("object" being a design concept). The variables in the pkg body represent the state of the object, same as the private fields of an object represented by an instance of a tagged type (or a "class" type in some other languages). Note the use of State for the hidden variable in Andersen's example, and the SPARK "state" annotations for such packages. -- Jeff Carter "How'd you like to hide the egg and gurgitate a few saucers of mocha java?" Never Give a Sucker an Even Break 101