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,8c424d8135e68278 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-13 14:12:16 PST Path: archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!wn1feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc54.POSTED!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada References: <9v4jsj$bd1$1@infosun2.rus.uni-stuttgart.de> <9v7f26$qn2$1@infosun2.rus.uni-stuttgart.de> <3C1754BA.C4560423@informatik.uni-jena.de> Subject: Re: Ada2005 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <5W6S7.19629$7y.219391@rwcrnsc54> Date: Thu, 13 Dec 2001 19:01:21 GMT NNTP-Posting-Host: 204.127.202.213 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc54 1008270081 204.127.202.213 (Thu, 13 Dec 2001 19:01:21 GMT) NNTP-Posting-Date: Thu, 13 Dec 2001 19:01:21 GMT Organization: AT&T Broadband Xref: archiver1.google.com comp.lang.ada:17887 Date: 2001-12-13T19:01:21+00:00 List-Id: "Stephen Leake" wrote in message news:u8zc76k04.fsf@gsfc.nasa.gov... > "Mark Lundquist" writes: > > > Actually, I can take back the last part of that. Flat class-oriented > > languages that allow classwide object declarations (e.g. static data members > > in C++ and Java) are no better off in this way than Ada. > > If you are saying that C++ has a flat namespace, I think you are > wrong. C++ "namespaces" provide at least one layer below global, and I > think they can be nested. I know... however, C++ still has the almost-flat *scoping* of C, and while C++ namespaces are hierarchial, all elements of the hierarchy are public, resulting in flat visibility at the top ("header file") layer (compare with Ada, where a package spec may occur within a body (textually or as a subunit) or as a private child). My point is, given a class declared in a header file, any other source file may #include that file, reference the class, create and manipulate instances of it, diddle with any diddleable static class members, and call the class' static functions. C++ namespaces impose a naming regime, but provide no encapsulation of classes or objects. Cheers, Mark