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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c08a7609345f4e5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Limited use for limited with? References: <853314bc-0f79-435f-86a5-d7bcdd610731@c10g2000yqh.googlegroups.com> Date: Thu, 30 Sep 2010 03:27:41 -0400 Message-ID: <82y6ajg07m.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt) Cancel-Lock: sha1:vmAyvnyWay1XZ0XUoTT0m8thIQA= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: b58684ca43be9e029e66129382 Xref: g2news1.google.com comp.lang.ada:14324 Date: 2010-09-30T03:27:41-04:00 List-Id: Ludovic Brenta writes: > I generally think twice or three times before declaring an access type > in the same package as the object type. In fact, I think twice before > declaring any access type at all :) To me, an access type makes the > package unclean. > > Since, in Ada, all objects of tagged types are passed by reference and > since Ada has class-wide types, you do not need any access type to > achieve pass-by-reference semantics or dynamic dispatching. This > leaves dynamic memory allocation as the only remaining justification > for access types. You left out accessibility checks, which are an important reason for named access types. -- -- Stephe