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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail From: "Jerry Coffin" Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 10 Mar 2005 20:58:13 -0800 Organization: http://groups.google.com Message-ID: <1110517093.881184.281320@g14g2000cwa.googlegroups.com> References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <42309456$1@news.broadpark.no> NNTP-Posting-Host: 70.33.25.135 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1110517099 5498 127.0.0.1 (11 Mar 2005 04:58:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 11 Mar 2005 04:58:19 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=70.33.25.135; posting-account=mZiOqwwAAAC5YZsJDHJLeReHGPXV5ENp Xref: g2news1.google.com comp.lang.ada:9093 comp.lang.c++:45057 comp.realtime:1238 comp.software-eng:4806 Date: 2005-03-10T20:58:13-08:00 List-Id: Pascal Obry wrote: [ ... ] > Most of us on the Ada side are considering that what is important in > a language is not what it permits but what it prohibits for just this > reason. We will all step on the wrong side at some point, we want the > language and the compiler to be able to warn us. Of course this can > look frustrating but it is invaluable in the long run. Short of using things like casts that are designed specifically to _prevent_ the compiler from giving warnings (and which have their counterparts in Ada) what practices on the "wrong side" do you see that a C++ compiler can't warn about? > Note that it is for this very reason that Java was born (a safer > C++). Java has indeed removed lot of unsafe constructs from C++. Thinking of Java as a safer C++ betrays misundertanding of one (or probably) both languages. Comparisons between Ada and C++ are at least somewhat reasonable -- while they approach the problems from entirely different directions, both attempt to address roughly similar problem spaces. In particular, both attempt to provide the ability to work at nearly any level from direct bit-bashing, up to relatively high-level expression of algorithms and their applications to collections of objects and such. Java differs substantially from either of these by eliminating not only the lowest level of access, but the top levels as well. While it's possible that the original _reason_ for inventing Java was safety (personally, I doubt it, but I don't claim to be a mind-reader to be able to say for sure), the result is considerably different. In point of fact, I don't think of Java as particularly closely related to C or C++ at all. Once you look past the syntax (I.e. the superficial parts of the language) Java isn't much like C or C++ at all -- under the skin, it strikes me as much more of a Smalltalk with odd syntax than C (or C++) with modified features. Don't get me wrong -- Java isn't really like Smalltalk either, but IMO, it's closer to Smalltalk than to C++. I should add that I happen to rather like Smalltalk, so that's not entirely bad. Unfortunately, I think Smalltalk is a lot better off with Smalltalk syntax. While I can believe that borrowing C's syntax contributed heavily to the success of Java, I'm personally of the opinion that C's syntax is probably its weakest point, while Smalltalk's is a major strength. -- Later, Jerry. The universe is a figment of its own imagination.