On 05/10/2017 12:35 PM, Nordlöw wrote:
Would it be possible to set up a mapping (either formal or informal) of each typical container (such as array, linked-list etc) plus element type to a suitable default allocator? And perhaps add this to the documentation of `std.experimental.allocator`?

I currently get the feeling that most programmers have no idea at all what allocator to choose for each given combination of container and element type they want to use.

Most developers should never need to touch or swap out allocators.
It can be a performance optimization for the more advanced users.

Let container makers decide a good default for /their/ implementation.

Allocators solve a problem that very few developers actually have. Contrary to popular belief. The default GC allocator is probably ok for most people. I'm happy with it for SPEW[0] and it heavily uses allocators.

[0] https://github.com/Devisualization/spew

Reply via email to