Phobos addition formal review: std.experimental.allocator

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 16 13:29:08 PDT 2015


On Saturday, 13 June 2015 at 19:08:26 UTC, Jacob Carlborg wrote:
> On 2015-06-12 13:06, Dicebot wrote:
>> The legendary allocator package by Andrei Alexandrescu has 
>> arrived at
>> your doorsteps and kindly asks to let it into Phobos
>>
>> http://wiki.dlang.org/Review/std.experimental.allocator
>>
>> Docs: 
>> http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html
>> Code:
>> https://github.com/andralex/phobos/tree/allocator/std/experimental/allocator
>
> I think "IAllocator", "theAllocator" and "it" are really bad 
> names. I recommend renaming those symbols to:
>
> IAllocator -> Allocator
> theAllocator -> currentAllocator or tlsAllocator
> it -> allocator or instance. Even better if a static 
> "opDispatch" could be used to forward all methods to the 
> instance.


https://github.com/D-Programming-Language/phobos/commit/319f3297418c515a6d2e52e6e52d0f3f5895f587 changes .it to .instance for all allocators. -- Andrei


More information about the Digitalmars-d mailing list