3 ms·
The author may be interested in Zig, where allocators are first-class components of the system. https://ziglang.org/documentation/0.9.1/#Choosing-an-Allocator
by kitd 4y ago
The author may be interested in Zig, where allocators are first-class components of the system.
https://ziglang.org/documentation/0.9.1/#Choosing-an-Allocator https://ziglang.org/documentation/0.9.1/#Choosing-an-Allocat...
There is even an arena allocator provided (amongst others) by the std lib.
- doesntmeananyth 4y agoYou may also be interested in this comment thread from the article page, where the author explains his opinion on Zig's approach to allocators: https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator/comment/9320539 https://www.rfleury.com/p/untangling-lifetimes-the-arena-all...
- jcparkyn 4y agoI don't use zig, but it seems to me that functions can choose exactly which type of allocator they want to accept (just by changing the type of the allocator parameter), making his point invalid.