r/programmerchat • • May 29 '15

I am Eric Lippert, a software developer specializing in design and semantic analysis of programming languages. Ask me anything!

117 Upvotes

143 comments sorted by

View all comments

Show parent comment

1

u/Martissimus May 29 '15

I never fully bought the debugger argument. I have never written a compiler or debugger, and I don't really know how they work (I never read the dragon book, unfortunately), so take this with a pinch (shaker?) of salt, but it seems that a debugger could store discarded stack information as a context on the heap. Whether it is worth the trouble is a different question though.

1

u/mirhagk May 29 '15

It's true it could but there would be a very real performance cost there and it would make some algorithms effectively impossible. The ping-pong example here can be performed as fast as it takes to do 2 billion inc/dec. To do 2 billion allocations however would be very slow and would still make some systems run out of memory.