Blog Post #0105: D-specific Stuff for GUI Programming

Jacob Carlborg doob at me.com
Mon Mar 23 10:26:33 UTC 2020


On Monday, 23 March 2020 at 10:02:48 UTC, Ron Tarrant wrote:
> Today starts a new series I'm calling Snippets and it's about 
> various D-specific stuff that may come in handy when building a 
> GUI. You can find it right here: 
> https://gtkdcoding.com/2020/03/23/0105-dlang-ui-snippets-i.html

If it's enough with CTFE compatible code in the constructor, the 
following is a much simpler version:

class DSingleton
{
     private __gshared DSingleton instance = new DSingleton;

     DSingleton get()
     {
         return instance;
     }
}

--
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list