On Tuesday, 25 June 2013 at 22:22:09 UTC, cybervadim wrote:
(introducing a new keyword allocator)
It would be easier to just pass an allocator object that provides the necessary methods and don't use new at all. (I kinda wish new wasn't in the language. It'd make this a little more consistent.)
The allocator's create function could also return wrapped types, like RefCounted!T or NotNull!T depending on what it does.
Though the devil is in the details here and I don't think I can say more without trying to actually do it.