forsyth at plan9.cs.york.ac.uk forsyth at plan9.cs.york.ac.uk
Wed Mar 12 13:43:42 PST 1997

>>can be used in Java. The reason is, that reference counting usually has a more
>>serious downside than the cyclic reference problem: pointer manipulation (e.g.
>>doing a *p++ through a large buffer). But fortunately, this does not happen in
>>Java because of the non-existence of explicit pointers. It is an old idea of

`explicit' pointers aren't a problem, for garbage collection (or safety),
even allowing this type of pointer arithmetic,
although you might want to ban the pointer arithmetic for other reasons of language
design.  you seem to be assuming a particular representation in the implementation;
with other representations, there's no trouble.

as far as i can tell, every stated reason for not including pointers in
Java, particularly `run-time safety' is bogus.  not all pointers are C
pointers, which have given references a bad name, and there are lots
of languages with perfectly safe pointers (often under a different
name), and even C pointers are actually allowed by Ansi C to be rather more constrained
by the Ansi C standard than many people think.

More information about the kaffe mailing list