Re:Conflating pointers with arrays: C's biggest mistake? (2009)
by thermodynthrway on Sunday July 22, 2018 @04:11AM
(#17585798)
That sounds like a fairly bad idea but both Java and C# let you access the stack and mess with variables from previous frames if you really want to. You can't access stack memory outside the heap hut I can't think of a use-case
[ Parent
| on HN ]
Re:Conflating pointers with arrays: C's biggest mistake? (2009)
by barrkel on Sunday July 22, 2018 @11:51AM
(#17587307)
C# does (via ref parameters) but Java does not - any values you mutate must logically live in the heap (or a static).
Some JIT optimization may allocate an instance in the stack, I'm not counting that.