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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7eaf9f2597de2259 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-05 08:35:41 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!pln-e!spln!dex!extra.newsguy.com!newsp.newsguy.com!drn From: mike@nospam Newsgroups: comp.lang.ada Subject: Re: on package naming, should the word Date: 5 Oct 2001 08:07:59 -0700 Organization: Newsguy News Service [http://newsguy.com] Message-ID: <9pkicf02ncr@drn.newsguy.com> References: <9pif1o01btl@drn.newsguy.com> <9pii95$jus$1@nh.pace.co.uk> <3bbd7a77.5463085@news.demon.co.uk> <9pk2dq01gvu@drn.newsguy.com> NNTP-Posting-Host: p-357.newsdawg.com X-Newsreader: Direct Read News 2.90 Xref: archiver1.google.com comp.lang.ada:13798 Date: 2001-10-05T08:07:59-07:00 List-Id: In article , Ted says... > >>So, I do not see why one can't do this in Ada >> >>package Ada.awt.event is >> type ActionEvent is tagged record .... end record; >> -- primitive operations on ActionEvent here >> >> type AdjustmentEvent is tagged record .... end record; >> -- primitive operations on AdjutsmentEvent here >> >> type ActionEvent is tagged record .... end record; >> -- primitive operations on ActionEvent here >> >> type ComponentAdapter is tagged record .... end record; >> -- primitive operations on ComponentAdapter here >> >> etc... >>end Ada.awt.event; > >You don't want to do this, because it gives all these classes complete >visibility into each other's implementation. I was mapping the Java classes/packge to Ada. In Java, all classes in the same package have the default access such that they can see each others. (you have the supply the keyword protected on private on the methods and data member to restrict this). so, in java, when you say class foo; ---> in file foo.java class moo; ---> in fle moo.java and both those class are in the same directory (i.e. package), then each method in each class can see all other methods and data in the other class (unless you make such method or data members protected or private)...