seeking advice: possible new @attribute to mark class' default property to avoid alias this ?

someone someone at somewhere.com
Sun Aug 8 00:52:43 UTC 2021


Now that I am aware of Walter's stance on alias this:

"alias this has turned out to be a mistake" @ 
https://news.ycombinator.com/item?id=28029184

... would you, I mean the community, think is it a good idea to 
file a DIP to eventually get a new attribute to unambiguously 
label a class' default property ?

eg: @default string whatever(...);
eg: @default @property string whatever(...); /// if @property 
survives; that is

... or whatever you consider it should be named ?

Besides, alias this was not implemented to handle default 
properties albeit it seems it is common practice to (as I was 
previously advised to in a previous related post).

Do you think it'll be worth it ?

PS#1: From my unqualified point-of-view it seems it won't be much 
difficult to add it but—I can be quite wrong.

PS#2: I am not using alias this anymore; it is a double-edged 
sword.


More information about the Digitalmars-d-learn mailing list