Comment by kllrnohj

21 hours ago

And those games do so in a language (C++) where allocators is not a headline feature, and is barely even supported at all in the standard library.

The important part is a language where the standard library isn't special, and Rust has this property, too. So in domains where things like per-frame allocators are useful, you can still have them. That capability just isn't cluttering up the more common path where that isn't useful.

I never used it in practice, so maybe the support isn't that good, but I was under the impression that it was possible to pass custom allocators basically everywhere in the STL. See for example the definition of a vector here:

https://en.cppreference.com/cpp/container/vector

  • std::allocator was so painful to use it was almost always easier to just reimplement the container instead (especially for trivial ones like vector).

    I haven't used the relatively new C++17 polymorphic_allocator, though, maybe it fixes this.