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: a07f3367d7,25d835bb9a4a003f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer01.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 Newsgroups: comp.lang.ada Subject: Re: Types, packages & objects : the good old naming conventions question (without religious ware) References: <561e0a4a-c6c0-42db-9f31-a70f4eae1ed9@a21g2000yqc.googlegroups.com> From: Stephen Leake Date: Fri, 06 Nov 2009 05:26:42 -0500 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:kLRbWYEyg51VFQWaZ60YlXPnyhc= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 76f8c4af3f9c5e197caa706516 Xref: g2news2.google.com comp.lang.ada:9011 Date: 2009-11-06T05:26:42-05:00 List-Id: "Vincent Marciante" writes: > "Stephen Leake" wrote in message > news:u1vkdrert.fsf@stephe-leake.org... >> This is illegal: >> >> procedure (List : in list); >> >> So we have to add noise to either the object or the type, to keep the >> compiler happy. That's all there is to it. > > That is not necessary: > > package sdgfkjasf is -- or whayever > > type List is ... > > procedure jsdfks (List : sdgfkjasf.List); > > ... That's the first time I've seen that suggestion. It's very interesting. The package name has to show up every time the type is paired with an object of the same name. But in other situations, the package name can be left off. So this ends up being less noise than appending _Type everywhere. Just to be pedantic, it _is_ adding noise. It's just a different form of noise than _Type. I'll have to try it in a semi-real project. I've been using _Type for over 15 years, so it will take some effort :). It's interesting why no one seems to have thought of this before. In general, the way to resolve ambiguities in Ada is to use more of the full name. Somehow that never occured to me in this context. -- -- Stephe