Re: Pointer vs Reference
- From: Lasse Reichstein Nielsen <lrn@xxxxxxxxxx>
- Date: Sun, 30 Sep 2007 02:14:20 +0200
Joshua Cranmer <Pidgeot18@xxxxxxxxxxx> writes:
In Java, it really is a pointer. The JLS actually specifically says
that reference values are pointers, as Stefan pointed out.
Probably refering to
"The reference values (often just /references/) are /pointers/ to these
objects, and a special null reference, which refers to no object."
- JLS 4.3.1
However, the JLS doesn't say what a "pointer" *is*, so that doesn't make
us any wiser. It has to be taken as merely informal explanation.
The word "pointer" is used in a few places around the JLS:
6.8.7:
"... Abbreviations, as in buf holding a pointer to a buffer of
some kind ..."
15.13.2
"because the embedded assignment of 2 to index occurs before the check
for a null pointer."
and ofcourse in the index:
"pointers
See references"
and
"pointer, 42" - referencing the first quote.
I.e., the JLS identifies references and "pointers", so saying that
references are pointers is trivial and vacuous.
/L
--
Lasse Reichstein Nielsen - lrn@xxxxxxxxxx
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
.
- Follow-Ups:
- Re: Pointer vs Reference
- From: Roedy Green
- Re: Pointer vs Reference
- Prev by Date: Re: Pointer vs Reference
- Next by Date: Re: notifying particular thread to wake up.
- Previous by thread: Re: Pointer vs Reference
- Next by thread: Re: Pointer vs Reference
- Index(es):
Relevant Pages
|