Phobos addition formal review: std.experimental.allocator

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 21 15:57:35 PDT 2015


On 6/21/15 4:47 AM, Dicebot wrote:
> 1. I have already mentioned that there is neither module structure
> overview in `package.d` nor actual module structure. This is still the
> case for
> http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html
> 2. `IAllocator` is defined inside `package.d` file. That means that it
> is impossible to use interface without import ALL of allocator modules
> 3. Same concern is about
> https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/package.d#L218-L228
> - unless you actually import all stuff via package.d, those configured
> allocators are not available.
> 4. There are no higher level usage examples and/or guidelines about how
> this is supposed to fit in user applications. Intention behind the
> library may be familiar to users coming from C++ but target D audience
> is much more than that. Having std.allocator.showcase is nice but it is
> still a bit too theoretical.
> 5.
> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_stats_collector.html
> has no overview documentation at all
> 6. Usage of ternary is not always clear / justified. In `IAllocator` it
> is explained and makes sense but there are things like
> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_bitmapped_block.html
> ("Ternary empty() - Returns true iff no memory is currently allocated
> with this allocator"). I am still not sure why it is used there instead
> of simple boolean.
>
> Overall opinion : I would surely vote for inclusion of this proposal in
> Phobos but in current shape it is not something I'd recommend to try to
> beginner/intermediate level D user.

Thanks for the feedback. I'll get to work on this straight away. -- Andrei



More information about the Digitalmars-d mailing list