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-7-bit X-Google-Thread: 103376,f3f9104dada53163 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: An interesting quote on Java and C++ Date: 1997/09/10 Message-ID: #1/1 X-Deja-AN: 271133272 References: <5ujjvq$t4s@drn.zippo.com> <01bcb881$915526a0$d7000064@sim01.amst.co.at> <34157a82.81185415@news.mindspring.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-09-10T00:00:00+00:00 List-Id: In article <34157a82.81185415@news.mindspring.com>, Robert Munck wrote: >On Mon, 8 Sep 1997 19:35:29 GMT, bobduff@world.std.com (Robert A Duff) >wrote: >>Surely you're not saying that Ada (as is) meets the goals of Java? > >I'm not aware of a document that lays out the goals >of the development of Java. Is there one? Beats me. But it's clear from the Java language documents that two goals of Java are (1) avoid security flaws, and (2) portability at the cost of efficiency. Ada meets neither of those goals. (1) Ada allows dangling pointers and so forth, and (2) Ada's arithmetic model favors efficiency over portability. Of course, Java doesn't meet Ada's goals, either. For example, the various run-time checks that Java defines are the minimal needed to avoid security flaws, and provide absolute portability -- they make no attempt to catch plain old bugs. Whereas Ada's run-time checks are helpful in catching bugs, but don't prevent security violations, and aren't portable. Consider, for example, that if X+Y overflows, Java gives the wrong answer, but always the same answer on all targets. Whereas Ada raises an exception on overflow, but it doesn't define exactly when overflow happens on different targets. Consider also that Ada allows range constraints, which can help catch bugs, but provide no particular security benefit -- so Java takes the C attitude there (although more portable than C); Java can't say "type T is range 1..10;". >...If so, >how does fail to match the goals of Ada (as documented >at great length from Strawman on)? Not sure what you mean here. Java doesn't meet Ada's "strawman" goals, but of course it doesn't try to. It has different goals. - Bob