2 ms·
Zig has a very simple and straightforward solution: Every standard library function which needs to allocate takes an allocator argument. That way it's immediate
by flohofwoe 6y ago
Zig has a very simple and straightforward solution: Every standard library function which needs to allocate takes an allocator argument. That way it's immediately obvious what functions are potentially expensive. It's not even a magic compiler or language feature, just a standard library convention.