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,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news1.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: _Type vs no _Type References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> <82lj5c5ecm.fsf@stephe-leake.org> <82zktq4n9b.fsf_-_@stephe-leake.org> Date: Thu, 04 Nov 2010 01:37:13 -0400 Message-ID: <82bp654pkm.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt) Cancel-Lock: sha1:5v2s+jSU+lA4ftjJKVt/6Typylk= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: cd8004cd24672e029e66102249 Xref: g2news2.google.com comp.lang.ada:16172 Date: 2010-11-04T01:37:13-04:00 List-Id: "Yannick Duchêne (Hibou57)" writes: > Le Wed, 03 Nov 2010 22:16:07 +0100, Yannick Duchêne (Hibou57) > a écrit: >> Now, using a renaming of Any_Package inside of itself : >> >> >> with Ada.Text_IO; >> >> -- Game: guess what is wrong with that program. >> >> procedure Test is >> >> package Any_Package is >> >> package Types renames Any_Package; >> >> type Foo is private; >> procedure Play_The_Foo_With_Me >> (Foo : Types.Foo); >> private >> Type Foo is new Integer; >> end Any_Package; > > But there is still a problem if the package wants to define a function > named Foo Yes; the type name collides with the subprogram name. But that just doesn't seem to be a problem in practice. Picking good names does seem to be the better solution to this part of the problem; good type names and good subprogram names tend to be different, while good type names and good subprogram parameter names tend to be the same. -- -- Stephe