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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,faf469c89f73f91d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-21 07:25:17 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: Package Instances??? Date: Thu, 21 Feb 2002 10:30:31 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <721b6d80.0202131302.1ccce2ed@posting.google.com> <3C6BFAFC.7060902@mail.com> <3C73F5F6.7050704@mail.com> <3C7487D6.5060603@mail.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:20213 Date: 2002-02-21T10:30:31-05:00 List-Id: "Hyman Rosen" wrote in message news:3C7487D6.5060603@mail.com... > But my purpose isn't to implement a type, it's to find a C++ analogue > for Ada packages. C++ namespaces are useless for anything except what > the name implies, namely establishing a namespace. Well, if you don't need a type, then you really do want an Ada package. Clearly the C++ analogue is a namespace. package P is procedure Op; I : Integer; end P; namespace N { void f(); extern int i; } In Ada, you have P.Op and P.I, and in C++ you have N::f() and N::i. What's the problem? (Note that in C++ you could use a class, and declare f() and i as static members, but you said you didn't want a type.)