Phobos addition formal review: std.experimental.allocator

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 13 12:08:25 PDT 2015


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.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list