On Saturday, 2 February 2019 at 16:56:45 UTC, Ron Tarrant wrote:
So, my big question is, do I instantiate like this:
DSingleton singleton = new DSingleton;
Or like this:
DSingleton singleton = singleton.get();
And subsequent calls would be...? The same? Using get() only?
This seems to be a
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 fo
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.
[...]
If you haven't already been t
On Saturday, 2 February 2019 at 19:23:58 UTC, Ron Tarrant wrote:
Thanks for the replies, fellow programmers. (generic, unisex,
PC, and all-encompassing)
If I could trouble someone for a complete working example so I
have something to study, that would be excellent.
I think that's what you r
On Sat, 02 Feb 2019 17:34:11 +, Eugene Wissner wrote:
> For creation get() should be always used, since it is the most
> convenient way to ensure that there is really only one instance of the
> singleton. Just make this() private, so only you can create new
> instances:
>
> private this()
> {
On Saturday, 2 February 2019 at 19:23:58 UTC, Ron Tarrant wrote:
Thanks for the replies, fellow programmers. (generic, unisex,
PC, and all-encompassing)
If I could trouble someone for a complete working example so I
have something to study, that would be excellent.
I found here an example:
h
Thanks for the replies, fellow programmers. (generic, unisex, PC,
and all-encompassing)
If I could trouble someone for a complete working example so I
have something to study, that would be excellent.
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 fo
On Sat, 2019-02-02 at 16:56 +, Ron Tarrant via Digitalmars-d-learn wrote:
> Hi guys,
and gals.
> 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.
General,
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
On Saturday, 2 February 2019 at 09:58:25 UTC, XavierAP wrote:
I've heard here and there that D guarantees RVO, or is even
specified to do so...
Is it spelled out in the language specification or elsewhere? I
haven't found it.
The D spec is often not the right place to look for the
specifica
I've heard here and there that D guarantees RVO, or is even
specified to do so...
Is it spelled out in the language specification or elsewhere? I
haven't found it.
Do you know the exact requirements for RVO or NRVO to be possible
in theory, and to be guaranteed in practice in D? Does it depe
12 matches
Mail list logo