Phobos addition formal review: std.experimental.allocator
Mike via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 23 18:11:01 PDT 2015
On Tuesday, 23 June 2015 at 21:12:10 UTC, Dicebot wrote:
> On Tuesday, 23 June 2015 at 19:17:21 UTC, Andrei Alexandrescu
>>
>> The "import std.allocator" is already minimal - only contains
>> the high level stuff. -- Andrei
>
> So you have chosen worst of both worlds - neither give power
> users ability to fine tune imports nor allow casual users
> always go with `import std.allocator` and be happy? :)
>
> If anything, that will be the first package.d in Phobos (AFAIK)
> which won't feature public import of _all_ package modules.
Well, since it was apparently my lousy suggestion that led to
this, I guess I'm obligated to comment.
It seems there is already precedent with std.digest.digest
(http://dlang.org/phobos/std_digest_digest.html). I'm sorry I
wasn't aware of this at the time. std.allocator.porcelain
couldn't stand, and I suggested what seemed most natural to me.
I've spend a number of years in C#-land, and that of course has
an affect on my biases. But D is not C# (thankfully).
Following the std.digest.digest precedent, there should probably
be std.allocator.allocator. It stinks IMO (std.digiest.api and
std.allocator.api would have been much better), but the naming
discussions are starting to take their toll.
Anyway, I suggest std.allocator.allocator as a compromise and a
precedent to follow in the future. It's tolerable.
Also, I can't seem to navigate std.allocator tree in the left nav
at
http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html. Please advise or fix.
Mike
More information about the Digitalmars-d
mailing list