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 X-Google-Thread: 103376,6cb2525ffbfe23ce X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: Why both "with" and "use"? Date: 1999/02/16 Message-ID: <7abv9k$631$1@platane.wanadoo.fr>#1/1 X-Deja-AN: 444945126 Content-Transfer-Encoding: 8bit References: <36C5B28C.F32C43A4@jps.net> <7a4f85$rh1$1@remarQ.com> <7a4j3h$64e@drn.newsguy.com> <7a8vvf$gig$2@platane.wanadoo.fr> <1103_919091637@DZOG-CHEN> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Organization: Adalog Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-16T00:00:00+00:00 List-Id: Ed Falis a �crit dans le message <1103_919091637@DZOG-CHEN>... >On Mon, 15 Feb 1999 10:14:39 +0100, "Jean-Pierre Rosen" wrote: > >> Nope. Import is equivalent to a "use" clause (makes directly visible), >> but is in no way required to get accessibility. >> You can use anything without any "import" if you use expanded names. >> (which implies that it is almost impossible to know which modules are >> required by a given module). > >Unless you're using a modern IDE, like Visual Age for Java, an Eiffel or Smalltalk IDE, or ObjectAda (and I believe GNAT Ada mode in Emacs?) > >The point being, where should the tradeoff be between clutter in the code and tool support? How much does it make sense to mechanize vs doing a lot of >bookkeeping in the source code itself? > >After using a variety of the tools above in the last year or so, I'm finding I don't miss fully-qualified names and context clauses in environments that don't use them. In >fact, it's a relief not having to deal with them as when using Ada bindings to large API sets like the JDK. > I agree with you (I'm a known supporter of the use clause), but I think you misunderstood my remark. I was stating that in Java, the whole world is "withed" (and this can include modules on a server on an island in the Pacific). To know what is really used, import clauses are not sufficient, you also need to check all fully qualified names. And if you rewrote your own dynamic loader, I don't see how you can know what is really used ! (BTW, this implies that configuration management in Java is a world-wide issue !!) I doubt ObjectAda provides this feature, since (fortunately) we have "with" clauses in Ada ! --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://perso.wanadoo.fr/adalog