Module for manual memory management

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 30 17:07:19 PST 2015


On 1/30/15 3:49 PM, Foo wrote:
> Is there interest in such a thing?
> I'm currently working on something for my own use and I'm curious if
> anyone else would be interested in something like that.
> I'm aware of Unique, RefCounted, Scoped, emplace and so on, but I'm not
> a big fan of some implementations (in my opinion not much of it follows
> the KISS principle). Also, as far as I remember, RefCounted and Unique
> are somewhat outdated.
> As said I'm just curious and I'm aware that my code may be somewhat
> un-phobos like.
>
> My current stand is this: http://dpaste.dzfl.pl/f1423322b7d5
> Just to make it clear: m3 = manual memory management = mmm = m3
>
> and here is some test code: http://dpaste.dzfl.pl/026013fbe19f
>
> I repeat: I know that I reimplement some logic like emplace and that my
> version is shorter but maybe not quite correct/incomplete.

So why come with your own self-admitted incomplete/incorrect 
alternatives instead of adding/improving the standard ones? If 
something's there that shouldn't, remove it. I don't get this "I didn't 
get it so I'll redo it incompletely".

> And I'm also aware of std.allocator and so on, but that is something
> different IMO.

Agreed.


Andrei



More information about the Digitalmars-d mailing list