From: "Warren W. Gay VE3WWG" <ve3wwg@home.com>
Subject: Re: is Java getting close to Ada strong type checking with this tool?
Date: Fri, 17 Aug 2001 18:17:24 GMT
Date: 2001-08-17T18:17:24+00:00 [thread overview]
Message-ID: <3B7D5FB2.80A431E8@home.com> (raw)
In-Reply-To: 3B7CEA1C.18D8AE77@avercom.net
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
prev parent reply other threads:[~2001-08-17 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-16 20:01 is Java getting close to Ada strong type checking with this tool? peteclose
2001-08-17 9:55 ` Tucker Taft
2001-08-17 18:17 ` Warren W. Gay VE3WWG [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox