Re: Singleton, alias to self?

2016-02-14 Thread Guillaume Piolat via Digitalmars-d-learn
On Sunday, 14 February 2016 at 13:23:28 UTC, Guillaume Piolat wrote: On Sunday, 14 February 2016 at 12:56:51 UTC, Vladde Nordholm wrote: I'm not sure of how to use alias efficiently, so I want to know if I could somehow do this (psuedo-code) class Singleton { //So instead of calling

Re: Singleton, alias to self?

2016-02-14 Thread Guillaume Piolat via Digitalmars-d-learn
On Sunday, 14 February 2016 at 12:56:51 UTC, Vladde Nordholm wrote: I'm not sure of how to use alias efficiently, so I want to know if I could somehow do this (psuedo-code) class Singleton { //So instead of calling `Singleton.getSingleton()` you just call `Singleton` alias this =

Singleton, alias to self?

2016-02-14 Thread Vladde Nordholm via Digitalmars-d-learn
I'm not sure of how to use alias efficiently, so I want to know if I could somehow do this (psuedo-code) class Singleton { //So instead of calling `Singleton.getSingleton()` you just call `Singleton` alias this = getSingleon() //code for singleton... } Thanks in advance, vladde

Re: Singleton, alias to self?

2016-02-14 Thread tcak via Digitalmars-d-learn
On Sunday, 14 February 2016 at 12:56:51 UTC, Vladde Nordholm wrote: I'm not sure of how to use alias efficiently, so I want to know if I could somehow do this (psuedo-code) class Singleton { //So instead of calling `Singleton.getSingleton()` you just call `Singleton` alias this =