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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,447bd1cf7a88c198 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-01 23:00:06 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!144.212.100.101!newsfeed.mathworks.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: mark_lundquist@my-deja.com Newsgroups: comp.lang.ada Subject: Java packages (was Re: Do we need "Mission-Critical" software? Was: What to Do? Date: Fri, 02 Feb 2001 06:45:23 GMT Organization: Deja.com Message-ID: <95dl22$9f5$1@nnrp1.deja.com> References: <3A4F5A4A.9ABA2C4F@chicagonet.net> <3A4F759E.A7D63F3F@netwood.net> <3A50ABDF.3A8F6C0D@acm.org> <92qdnn$jfg$1@news.huji.ac.il> <3A50C371.8B7B871@home.com> <3A51EC04.91353CE7@uol.com.br> <3A529C97.2CA4777F@home.com> <3A53CB9E.EA7CF86C@uol.com.br> <3A5466DE.811D43A5@acm.org> <932aol$ikc$1@nnrp1.deja.com> <932mi6$r2k$1@trog.dera.gov.uk> <9343b1$3g5$1@nnrp1.deja.com> <934iuf$eqv$1@nnrp1.deja.com> <937kc7$ssq$1@nnrp1.deja.com> <93c0e9$4u6$1@nnrp1.deja.com> <93e33l$tfu$1@nnrp1.deja.com> <93ekmo$a14$1@nnrp1.deja.com> <93f73f$mt1$1@nnrp1.deja.com> <93fnao$49u$1@nnrp1.deja.com> <93l6ut$pvf$1@nnrp1.deja.com> <3A64A94C.F265050A@ftw.rsc.raytheon.com> NNTP-Posting-Host: 24.20.66.55 X-Article-Creation-Date: Fri Feb 02 06:45:23 2001 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) X-Http-Proxy: 1.1 x56.deja.com:80 (Squid/1.1.22) for client 24.20.66.55 X-MyDeja-Info: XMYDJUIDmark_lundquist Xref: supernews.google.com comp.lang.ada:4845 Date: 2001-02-02T06:45:23+00:00 List-Id: In article <3A64A94C.F265050A@ftw.rsc.raytheon.com>, Wes Groleau wrote: > > > Java wanted to have better namespace control, so Java has packages. > > These are better than C++ namespaces and more like Ada packages. But > > the encapsulation construct in Java is still the "class", and in at > > least two important senses (there are several) of the value > > of "separation of interface and implementation", Java classes fall > > short, > > The fact that in Java, "package" is so closely coupled to "subdirectory" > shows that the Java designers had little understanding of the > _difference_ between interface and implementation, so how could they > see any reason to _separate_ them? Hmmm, I think that may be a misapprehension on your part... You're thinking of the directory structure of class files, which follows the package hierarchy. But that's an implementation detail; the semantics of Java packages in no way depends on it. And anyway, finding fault with Java packages for not being an encapsulation mechanism is missing the point -- Java packages are not supposed to be an encapsulation mechanism, they are strictly a namespace control mechanism. The encapsulation mechanism is the class, and it fulfills the essential aspect of encapsulation (by means of private members)... > More evidence is in the fact that > every primitive type declaration basically describes an implementation > where most type definitions in Ada (at least in well-written Ada) > emphasize the abstractions more than the implementations. Yes... as I pointed out in the previous post, Java classes don't provide separation of interface and implementation in some important senses (those that have to do with textual separation). Mark Lundquist Sent via Deja.com http://www.deja.com/