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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8a49f460b1976768 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-17 11:17:25 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!east1.newsfeed.sprint-canada.net!news.storm.ca!nnrp1.tor.metronet.ca!not-for-mail Message-ID: <3B7D5FB2.80A431E8@home.com> From: "Warren W. Gay VE3WWG" X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: is Java getting close to Ada strong type checking with this tool? References: <9lh8ql05og@drn.newsguy.com> <3B7CEA1C.18D8AE77@avercom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 17 Aug 2001 18:17:24 GMT NNTP-Posting-Host: 198.96.47.195 NNTP-Posting-Date: Fri, 17 Aug 2001 12:17:24 MDT Organization: MetroNet Communications Group Inc. Xref: archiver1.google.com comp.lang.ada:12066 Date: 2001-08-17T18:17:24+00:00 List-Id: Tucker Taft wrote: > The key difference is that programmers can't communicate > as much in Java as they can in Ada. For example, all arrays > in Java are indexed by integers 0..length-1. There are many > applications where this is not the natural index type for the > array. Arrays are essentially like functions, and the index > type should be strongly typed, just like the parameters to a function. > Not all functions are presumed to take an integer parameter > ranging from 0..N-1! > > Perhaps even more glaringly is that Java doesn't have enumeration > types, nor any user-defined scalar types (not even user-defined names > for the predefined scalar types). That means that a parameter type is > often simply "int" when in fact the only legal values are much more > restricted, and correspond roughly to an enumeration. There really > is no reasonable excuse for having omitted enumeration types from > Java (I have read the "official" rationale about lack of extensibility > and it is extremely weak in my view). > > Unfortunately, there is no way for an enhanced static checker to > overcome some of these limitations. There simply isn't enough > information. It was also pointed out in a paper I recently read, that all Java methods are dynamic (virtual). This also eliminates some compile time (static) checking that otherwise could have been performed. -- Warren W. Gay VE3WWG http://members.home.net/ve3wwg