ArrayListUnmanaged is much smaller than ArrayList because it does not store an Allocator (nearly half the size iirc).
In practice you very rarely need an extra copy of the Allocator because it’s usually available already as a function parameter or a member of the enclosing structure if there is one.
Also, I find the ergonomics of ArrayListUnmanaged are actually better because you can default initialize them to .empty, which is kind of cool because you’re not forced to provide an allocator until it’s actually used.
Ok that makes sense somehow. And I like compact and small.
But theoretically you can append with different allocators to the same list, which will totally crash (i dare not try it).
Isn’t that a complete mess (theoretically)?
that depends entirely on the allocators you use.
for the allocators currently in std that will crash
but there is nothing stopping you from creating some allocators that let you do that