<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div>Hi,</div><div><br></div><div>I was watching DConf13 David Simcha's talk recently ... what happened to the idea of creating std.pattern? I do not see it phobos.</div><div><br></div><div>I have Singleton design pattern implementation based on David's code:</div><div><a href="https://github.com/curoles/webos/blob/master/src/d/gem/Singleton.d">https://github.com/curoles/webos/blob/master/src/d/gem/Singleton.d</a></div><div><br></div><div>usage:</div><div class="line" id="LC53"> <span class="k">auto</span> <span class="n">my1</span> <span class="p">=</span> <span class="n">Singleton</span><span class="p">!</span><span class="n">MyClass</span><span class="p">.</span><span class="n">get</span><span class="p">();</span></div><div class="line"
id="LC54"> <span class="k">auto</span> <span class="n">my2</span> <span class="p">=</span> <span class="n">Singleton</span><span class="p">!</span><span class="n">MyClass</span><span class="p">.</span><span class="n">get</span><span class="p">();</span></div><div class="line"> <span class="k">assert</span><span class="p">(</span><span class="n">my2</span> <span class="k">is</span> <span class="n">my1</span><span class="p">);</span></div><div class="line"><span class="p"><br></span></div><div class="line"><span class="p">Thanks,</span></div><div class="line"><span class="p">Igor</span></div><div><span class="p"><br></span></div><div><span class="p"><br></span></div><div class="line"></div></div></body></html>