On 08/12/13 21:12, Ali Çehreli wrote:
In any case, I think class static this is the solution:
I think I may have misled you by talking about properties, because I _don't_ mean a property of a class. I mean a public standalone function that is marked as a @property, which returns a persistent instance of some class.
The actual motivation is reimplementing std.random.rndGen but with class-based RNGs instead of structs :-)
A consequence of this is that I don't think a static class instance can work, because the returned class has to be non-const -- it's an RNG that will be updated!