Singleton in Action?
Dejan Lekic
dejan.lekic at gmail.com
Sun Feb 3 22:25:18 UTC 2019
On Saturday, 2 February 2019 at 16:56:45 UTC, Ron Tarrant wrote:
> Hi guys,
>
> I ran into another snag this morning while trying to implement
> a singleton. I found all kinds of examples of singleton
> definitions, but nothing about how to put them into practice.
>
> Can someone show me a code example for how one would actually
> use a singleton pattern in D? When I did the same thing in PHP,
> it took me forever to wrap my brain around it, so I'm hoping to
> get there a little faster this time.
I strongly suggest you find the thread started by Andrej Mitrovic
many years ago. He compared several implementations of
(thread-safe) singletons. I it an extremely helpful stuff, IMHO.
More information about the Digitalmars-d-learn
mailing list