News for hackers. Stuff that matters.
Re:Revisiting the design approach to Zig by cassepipe on Tuesday September 06, 2022 @09:16AM (#32736689)
I suspect this means that the Zig stdlib does not use a default allocator but Zig provides a default allocator that you have to intentionnally use in your functions if you want to allocate. Is this correct ?
Re:Revisiting the design approach to Zig by P5fRxh5kUvp2th on Tuesday September 06, 2022 @09:58AM (#32737205)
This is correct, with the caveat that I believe zig provides several different allocators that you can pick and choose for various situations.

so the word 'default' may not necessarily apply the way it doesn't apply wrt to 'default pointer' in C++ because it offers both unique_ptr and shared_ptr with very different behaviors and semantics.