Tue, 11 Apr 2000 22:53:28 +1000
Has one really, really glaring error that's caused significant problems.
There are 2 statements:
Java doesn't have pointers (it has references to do the same job)
Ada has pointers
In fact, Ada does NOT have pointers. It has access types to do the same job,
but without the insecurity of pointer arithmetic et al.
In fact, the Java reference construct is the same as Ada's access type.
You can say that "in effect" Ada has pointers, since it has access types
(references) which act the same way but are safe
You can say that Java "in effect" has pointers, since it has references
(access types) that act the same way but are safe.
You can say that Ada doesn't have pointers.
You can say that Java doesn't have pointers.
What you can't do is say that Java doesn't have pointers, but that Ada does.
It's a both or neither deal.
Here are the statements on the page:
For instance, Ada doesn't have the same built-in safety at the language
level (for example, lack of pointers). If Java technology security was
simply a language-level construct, then someone programming in Ada would
circumvent all Java technology security checks.
Invalid Memory Access
There are many language features within the Java programming language that
contribute to this [secure] behavior. First and foremost is the fact that
the Java programming language does not let you perform pointer arithmetic.
This is perhaps the most important language feature that contributes to the
Java language's safety, since it is pointer arithmetic that leads to
accessing inappropriate memory areas, which leads to runtime crashes. Not
permitting pointer arithmetic is not saying the Java programming language
doesn't support pointers. In fact pointers in the Java programming language
are called references, and they are fully supported. The existence of
reference variables allows you to create data structures like linked lists,
binary trees, or any other where you would normally think of using a pointer
variable in a language like C or C++.
These two statements taken together, are just plain untrue.