Who modified my local variable?
bryan.sant at gmail.com
Tue Jun 13 13:16:39 MDT 2006
On 6/13/06, Michael L Torrie <torriem at chem.byu.edu> wrote:
> Sure. But my real point was the Java habit of always doing "new" causes
> a ton of problems for Java programmers heading into C++. Rather than
> use a local variable allocated on the stack, they do "new" which leaks.
> That is the problem. So really it's not a language problem; it's a
> programmer problem. But a programmer can be trained; unfortunately Java
> is not a good trainer in this instance. In my opinion it would be
> better to subject a new CS student to C and C++ in all their glory and
> then introduce them to managed, Garbage-collected languages later,
> rather than the other way around.
> So your point below about cost of allocations is besides the point.
Ah, I see. I agree with you.
More information about the PLUG