static member and/or @property ?
Edwin van Leeuwen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 19 08:23:53 PDT 2016
On Thursday, 19 May 2016 at 15:12:44 UTC, Edwin van Leeuwen wrote:
> 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
Sorry I meant __traits(identifier, typeof(this)).
More information about the Digitalmars-d-learn
mailing list