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=0.1 required=5.0 tests=BAYES_05,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 Subject: Re: Why both "with" and "use"? Date: 1999/02/13 Message-ID: <7a4j3h$64e@drn.newsguy.com>#1/1 X-Deja-AN: 444054758 References: <36C5B28C.F32C43A4@jps.net> <7a4f85$rh1$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 <7a4f85$rh1$1@remarQ.com>, "Pat says... > ..good stuff snipped.. thanks for the nice review. Just to compare this to Java, in Java, almost everyone does something like this: import package_name;* this imports, and at the same time, makes visible all class in package and all public entities in all classes. One can import one specific class from the package: import package_name.class_name And this also combines importing and making directly visible all public entities in the class. Also, in Java a package seems to have different purpose than with Ada. In Java a package is a collection of classes. In OO Ada, a package usually contains one tagged type. or is this not the normal practice? I feel that the Ada package and the "with" and the "use" give better control of things. Not only that, the fact that in Java, one can compile a program that uses some class, but becuase classes are loaded at run time, it is possible to load the old byte code of compiled against class if the class path is wrong, or if the new byte code for the compiled class was not jarred correctly. I fee the whole development and software packaging with Java is a pain and can lead to errors. In classical development (as in C/C++/Ada etc..) these kinds of problems do not happen as much (even with dynamic shared libraries, there is a check done against version numbers of libraries at load/run time to make sure the correct library code is loaded). Bill