| ▲ | marcosdumay 5 hours ago | |||||||
> The distinction of stack vs heap objects is an old distinction that is deeply encoded in the semantics of C. It's the most flexible way to implement recursive functions, and it's encoded on the semantics of the opcodes of every modern processor. They are way more deeply entrenched in our tech than just in C. But it may make sense to mix them in some ways. None of that detracts from the point. | ||||||||
| ▲ | xorvoid 4 hours ago | parent | next [-] | |||||||
That's a good point. It is pretty intertwined with ISAs. But, I think you could successfully argue it's just C semantics leaking into the ISA. C was so incredibly successful that it's hard to appreciate sometimes that all the systems (abstractions above and below) that touch it came to embrace and conform to it's semantics. | ||||||||
| ||||||||
| ▲ | kazinator 4 hours ago | parent | prev [-] | |||||||
A linear stack, distinct from a heap, is not required for recursion. It's also not required for most of the local state: the minimal requirement is to keep track of the minimal context information in order to resume the suspended caller when the callee terminates. | ||||||||