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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: rogoff@sccm.Stanford.EDU (Brian Rogoff) Subject: Re: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Date: 1996/10/16 Message-ID: #1/1 X-Deja-AN: 189849086 references: <325D7F9B.2A8B@gte.net> organization: /u/rogoff/.organization reply-to: rogoff@sccm.stanford.edu newsgroups: comp.lang.ada Date: 1996-10-16T00:00:00+00:00 List-Id: dale@rmit.edu.au (Dale Stanbrough) writes: " To which I would add "hierarchical package system", though I'm sure someone out there must feel that this is also bad! This would approximate my short list of Ada advantages over Java. Besides GC, which is arguable, no one has listed any *language* advantages of Java over Ada." I think Interfaces are a _very_ nice feature. Dale, I think you may have got me! I don't think interfaces really add anything that you can't do in Ada 95 with the access discriminant trick (using a pointer to an containing type to parameterize a component; I think Barnes has some examples of this in his excellent book), but they certainly make one case of this a lot less work. The access discriminant trick also allows more MI than do interfaces. Also, pure signature checking can be done with generics, using generic formal package parameters. So, while I think you can do (a lot) more with Ada 95, I agree that interfaces are nice and convenient. I think they could only be considered an advantage if it turned out that the style of programming that interfaces facilitate constitute a very large fraction of programming compared to the Ada 95 facilities. Certainly my Java programs make heavy use of interfaces, in particular implementations of the "Composite" pattern use interfaces rather than abstract classes. -- Brian