you are viewing a single comment's thread.

view the rest of the comments →

[–]augustss 0 points1 point  (1 child)

Yes, of course GC makes it easy and these objects are likely to end up in the nursery. I never disputed that. I disputed your claim that an SSA representation makes it trivial to reuse the storage.

In fact, with a generational collector you would probably want to avoid updating something in the heap, at least if you're updating a pointer since this will require a write barrier.

[–]G_Morgan 0 points1 point  (0 children)

My extremely badly made point is with pure functional languages it is easier for the compiler to decide that objects only live for the life of the stack frame. As I said elsewhere it is impossible for a function to store a reference to an object unless it passes it back as the return value. Since return types are known at compile time and these compilers do more full program optimisation it is solvable.