News for hackers. Stuff that matters.
Re:Why should I use a pointer rather than the object itself? by stusmall on Friday March 07, 2014 @09:34PM (#7364008)
I think that might be a bit too broad of a take away. I hate to be a pedant but C# allows user defined value types and I'm sure there are other GC'd languages that aren't as reference type heavy as Java. I think it would be a more fair statement if you replaced "garbage collected environments" with Java. I say "more fair" because I don't think I know any serious Java devs who don't understand the difference between reference and value types. I could just be lucky with who have crossed my path though.

EDIT: After thinking about it a little, most of the Java people I know have at least some embedded or native background. This could be a reason. I don't know what the market over all is like.

Re:Why should I use a pointer rather than the object itself? by stormbrew on Friday March 07, 2014 @09:58PM (#7364071)
Consider the other direction from Java, into the fully dynamic languages. Many of those give you even less ability to control heap vs. stack allocations than Java does and often present an everything-is-a-reference facade even on things that are often optimized to stack objects (Fixnum in Ruby for eg).

But yes, a java programmer with embedded or native background would have a better understanding of this than people who learned Java first, which is what I'm really addressing here. And in the OP on SE you can clearly see that this is a big part of that person's confusion.

Re:Why should I use a pointer rather than the object itself? by byroot on Friday March 07, 2014 @10:35PM (#7364132)
> optimized to stack objects (Fixnum in Ruby for eg)

I can't find any information on that, do you have a link on that subject?

Re:Why should I use a pointer rather than the object itself? by stormbrew on Saturday March 08, 2014 @05:14PM (#7366589)
Which part, that they're optimized to stack objects or that they appear as if they're referenced objects?