Re:Why should I use a pointer rather than the object itself?
by malisper on Friday March 07, 2014 @07:22PM
(#7363643)
But the fact that they are programming in an environment where everything is a pointer is hidden to the them. In C++ one needs to explicitly use pointers whereas in Java all of the pointers are handled behind the scenes.
[ Parent
| on HN ]
Re:Why should I use a pointer rather than the object itself?
by abengoam on Friday March 07, 2014 @08:30PM
(#7363846)
Not really. In Java it's a leaky abstraction - it's true that the JVM does a lot of micromanagement for you, but if you are careless you start getting exceptions (best case scenario) or start to get mysterious changes in your data (worst case scenario).
I agree with grandparent that understanding what a pointer is and that almost everything in a Java program is a pointer it's critical for a Java programmer.