On Friday, 11 May 2018 at 11:42:07 UTC, Dukc wrote:
On Thursday, 10 May 2018 at 14:15:18 UTC, Yuxuan Shui wrote:
...
// constructor of DataStructure
this(Allocator alloc=__ALLOC__) {...}
...
auto alloc = new SomeAllocator();
define __ALLOC__ = alloc;
// And we don't need to pass alloc everytime
...
Is this a good idea?
Doesn't this basically mean including the implicits Martin
Odersky talked about at Dconf in D?
Yes it does. I was thinking the exact same thing while watching
his talk; implicits would be perfect for allocators.