On Saturday, 31 March 2018 at 19:38:31 UTC, Per Nordlöw wrote:
On Saturday, 31 March 2018 at 19:31:37 UTC, Rubn wrote:
Be willing to change your code, the allocator can change at
any point. What you implement today may not work tomorrow,
what you fix to work for tomorrow may not end up working the
next day (in terms of releases). That really should be
something that is mentioned when you suggest using an
experimential feature, there's no guarantees at all. It might
not even get put into phobos. If your project is going to be
used over the course of a year or more than maybe you
shouldn't use it.
Ok, thanks for the point.
Is the dub package stdx-allocator [1] a better alternative in
this regard?
[1] https://github.com/dlang-community/stdx-allocator
Yep, that's why it was created. It's a snapshot of
https://docarchives.dlang.io/v2.077.0/phobos/std_experimental_allocator.html
It might be updated later, but with dub it's really easy to lock
it to a specific version - which you can't when upgrading the
compiler.