static class vs. static struct
ref2401 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jan 27 01:01:37 PST 2015
For several times I've met struct(or static struct) usage in
Phobos for singleton pattern implementation. Unfortunately now i
can remember only core.runtime.Runtime.
So I've got a question. Why do Phobos guys use struct or static
struct for or singleton pattern implementation? Why don't use
static final class for this purpose?
More information about the Digitalmars-d-learn
mailing list