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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6cb2525ffbfe23ce X-Google-Attributes: gid103376,public From: bill@nospam.com Subject: Re: Why both "with" and "use"? Date: 1999/02/13 Message-ID: <7a51sg$smh@drn.newsguy.com>#1/1 X-Deja-AN: 444125105 References: <36C5B28C.F32C43A4@jps.net> <7a4f85$rh1$1@remarQ.com> <7a4j3h$64e@drn.newsguy.com> <7a4pem$qlc$1@remarQ.com> Organization: Newsguy News Service [http://www.newsguy.com] Newsgroups: comp.lang.ada Date: 1999-02-13T00:00:00+00:00 List-Id: In article , Matthew says... > >Perhaps I am being pedantic, but I don't regard a package as part of a >type. No, you are not being pedantic. I think this is the correct way to look at too. >The package is just syntactic overhead necessary to >identify the primitive operations, but the package itself is not part of >the type. > >When they give me a bag at the supermarket to hold my groceries, it's the >groceries that I am interested in, not the bag. If I were to make a >list of the things I picked up at the store, I probably wouldn't include >the bag in that list. Nice way to express this idea. This makes it also sound you'll be happy with the 'namespace' construct in C++. Many people use a namespace to inclose in it other classes or even other namespaces, to help organize the contents of the "supermarket" bag. actually I like the 'namespace' more than the Java package. Java packages are also physically tied to directory structure, which is annoying to me, i.e. package A.B.PackageX, must live is A/B/PackageX directory somewhere on the disk. While Ada packages and C++ namespaces has nothing to do with where the actuall code can be found. I think Java did it that way to help the JVM located the bytecode file at run-time. Bill