Re: arrays and variables
On 06.04.2013 17:25, lipska the kat wrote:
On 06/04/13 14:20, Robert Klemme wrote:
On 06.04.2013 10:11, lipska the kat wrote:
On 05/04/13 21:33, Lew wrote:
lipska the kat wrote:
Stefan Ram wrote:
Arved Sandstrom writes:
Stefan Ram wrote:
Arved Sandstrom writes:
[snip]
What is C? We have pointers in Java, see the JLS.
Do we? I never knew that
It's in the JLS, 4.3.1.
"An object is a class instance or an array.
"The reference values (often just references) are pointers to these
objects,
and a special null reference, which refers to no object."
This is a rhetorical usage of the word pointer and says nothing about
the underlying mechanism used to implement references.
Why "rhetorical"?
The Java Language Specification is just that, a specification.
Constraining an implementation to use *pointers is not within the
purview of the specification, this is why I suggested that the usage is
rhetorical.
I don't think it is constraining implementations - it merely uses
"pointer" with a different meaning (suggestion: "something that points
to something") than the one you have in mind and which is used commonly
in CS.
and why? There is nothing weaselish about quoting the JLS.
I'd be very interested to see the line in the spec that says
'It [Java] only has pointers for reference types'
Show me that and watch me eat my hat.
Can we skip the "show" part and directly go to "eat my hat"? ;-)
I think most people in software engineering actually use the terms the
way you have presented them here which is also reflected in the article
about pointers on wikipedia. That does not preclude other usages in
specific context so the heads up of Lew is actually in order to keep us
alert and use terms consciously.
Of course it is, how could I possibly imagine that it could ever be
otherwise.
See? ;-)
Although ... actually, forget it, it really isn't that important, the
sun is shining and I have seeds to sow, the lawn to cut and frogs to
watch in the pond.
I'll send our cat over. Here it's still uncomfortably cold (although
getting better) and she prefers to stay in an demonstrate her bad temper...
Cheers
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/