3 ms·
>or you use some sort of generic inversion-of-control mechanism like async/await or call/cc, which really wants dynamic memory allocation. To that end, Zig doe
by throwaway82652 5y ago
>or you use some sort of generic inversion-of-control mechanism like async/await or call/cc, which really wants dynamic memory allocation.
To that end, Zig does have another kind of function coloring that's useful there: functions which take an allocator parameter. I like that about Zig, I wish C++ and Rust were better about doing it. Sadly you can still hide this by referencing a static allocator in Zig so it's not totally there yet on the language level.