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,2a687662f09731bb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed.freenet.de!news.n-ix.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ada Quality and Style book discussion From: Georg Bauhaus In-Reply-To: References: <1132227919.9036.51.camel@sonnenregen> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1132233886.11218.11.camel@sonnenregen> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Date: Thu, 17 Nov 2005 14:24:46 +0100 NNTP-Posting-Date: 17 Nov 2005 14:21:53 MET NNTP-Posting-Host: c1e4c37d.newsread4.arcor-online.net X-Trace: DXC=?7\GXCeEEC^g8i1FI:ejgIfPPldDjW\KbG]kaMH1BZS;MmC65FS= On Thu, 2005-11-17 at 07:37 -0500, Stephen Leake wrote: > Georg Bauhaus writes: > > > On Thu, 2005-11-17 at 04:49 +0000, Anonymous Coward wrote: > >> "_Type" is meaningful, because it indicates a > >> user defined type. > > > > This alone will justify names like XYZ_Package > > UVW_Procedure, etc. > > No, it doesn't, because package names never collide with object names. I'm not sure I understand what particular collision you have in mind. An artificial example, package Y is new X_Package; ... package Collide is type T_Type is range 1 ..99; Y: T_Type := 42; end Collide; ... use Collide; package H_Package is new G_Package(T_Type, Y, Y); -- Bang! where G_Package is declared with X_Package; generic type Some_Type is range <>; with package Some_Package is new X_Package(<>); -- package name Some_Variable: in out Some_Type; -- object name package G_Package is ... Here, adopting the convention and adding a _Package suffix, package Y_Package is new X_Package; will allow resolving the naming conflict. But is Y_package the best name? Or should I just qualify Collide.Y? > Type names do collide with object names; that's the _only_ reason they > need a special naming convention.