31-Jan-2014 08:51, Igor Lesik пишет:
Hi,

I was watching DConf13 David Simcha's talk recently ... what happened to the idea of creating std.pattern? I do not see it phobos.

I have Singleton design pattern implementation based on David's code:
https://github.com/curoles/webos/blob/master/src/d/gem/Singleton.d

usage:
    auto my1 = Singleton!MyClass.get();
    auto my2 = Singleton!MyClass.get();
    assert(my2 is my1);

Thanks,
Igor


There is this ready for review:
http://someboddy.github.io/phobos/ddocs/for-idioms/idioms.html
https://github.com/D-Programming-Language/phobos/pull/1294



_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos


-- 
Dmitry Olshansky