Class member always has the same address
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 20 03:31:34 PDT 2016
On Sunday, 20 March 2016 at 09:53:07 UTC, szymski wrote:
> Ok, I understand now, thanks. I used C# a lot before and there
> default initialization worked like per instance initialization.
Yes, I assumed you were thinking of C# or Java classes with this.
When coming to a new language, it's natural to use the idioms
you're used to. That isn't always going to work the way you
expect. If you're lucky, you'll see compiler errors. Otherwise,
you'll find yourself scratching your head at odd behavior. When
you encounter such situations in D, the answer is often in the
documentation or somewhere here in the forum
More information about the Digitalmars-d-learn
mailing list