3 ms·
How do you create recursive data structure on the stack?
by maattdd 3y ago
How do you create recursive data structure on the stack?
- rightbyte 3y agoUsing pointers to the stack?
- maattdd 3y agoPointers to stack sound like a recipe for disaster (all those pointers will be dangling very very soon).
- softwaredoug 3y agoI’d argue it’s safer to have the paradigm of “i own stuff then delegate it you” (ie down the stack) then the non hierarchy chaos the heap invites