static member and/or @property ?
Edwin van Leeuwen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 19 08:12:44 PDT 2016
On Thursday, 19 May 2016 at 15:04:00 UTC, chmike wrote:
> The only viable solution I found so far is by using distinct
> member names. In the interface we define name as a property,
> and in the class we define the static member with another name.
> Is it possible to avoid the different names ?
Can you use identifier!(typeof(this)) or something along those
lines. I am not sure how it behaves with inheritance.
https://dlang.org/spec/traits.html#identifier
More information about the Digitalmars-d-learn
mailing list