4 ms·
It'd be very interesting to see an OO language that passes around allocators like zig does. There is definitely nothing in the concept itself that stops that.
by yxhuvud 11mo ago
It'd be very interesting to see an OO language that passes around allocators like zig does. There is definitely nothing in the concept itself that stops that.
- throwaway2037 11mo agoWhat about allocators in C++ STL (Standard Template Library)? Honestly, I have been reading & writing C++ for a squillion years, and (1) I have never used an allocator myself, and (2) never seen anyone else use it. (Granted, I have not seen a huge number of enterprise C++ code bases.)
- bnolsen 11mo agothey are very awkward to use in the current STL, they are part of the template definition. Back in the day EASTL did allocators much better but it never became a thing.
- riku_iki 11mo ago> (1) I have never used an allocator myself, and (2) never seen anyone else use it. arena allocators are necessity for high performance software, because heap allocations are magnitude slower.