4 ms·
So if nothing moves, you can't make an array that grows?
by RantyDave 15d ago
So if nothing moves, you can't make an array that grows?
- bobbydigitales 15d agohttps://github.com/aardappel/goose/blob/master/samples/02_memory.goose https://github.com/aardappel/goose/blob/master/samples/02_me...
- codys 15d agoIt appears they got around that by making expanding and contracting data arrays builtin types the compiler impls. And it does this by creating what they call a "data stack" for each thing that needs to grow. To me it reads like "we have a builtin type that hides the heap allocation and does the free at the scope exit ", which is fine I guess as it keeps the nature of the language in tying lifetimes strictly to function scopes.