Comment

Comment by Aardappel

Only top level growable arrays get their own "stack", if you create an array of arrays it only uses one stack.

How you deal with the inner stack growing depends, ideally they don't grow (construction only), or you can make them fixed size, or with a capacity, or in the worst case, as a pool. The language has facilities for all of these.

parent Aardappel 7 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton