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

2021-08-07 Thread someone via Digitalmars-d-learn
On Sunday, 8 August 2021 at 05:07:17 UTC, jfondren wrote: On Sunday, 8 August 2021 at 04:51:48 UTC, someone wrote: On Sunday, 8 August 2021 at 04:30:12 UTC, rikki cattermole wrote: So a field that will automatically be resolved to as part of the behavior of generated toString methods. No. A d

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

2021-08-07 Thread jfondren via Digitalmars-d-learn
On Sunday, 8 August 2021 at 04:51:48 UTC, someone wrote: On Sunday, 8 August 2021 at 04:30:12 UTC, rikki cattermole wrote: So a field that will automatically be resolved to as part of the behavior of generated toString methods. No. A default property can be another object altogether. The best

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

2021-08-07 Thread someone via Digitalmars-d-learn
On Sunday, 8 August 2021 at 04:30:12 UTC, rikki cattermole wrote: So a field that will automatically be resolved to as part of the behavior of generated toString methods. No. A default property can be another object altogether. The best use case I can think of is a default collection for a cla

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

2021-08-07 Thread rikki cattermole via Digitalmars-d-learn
So a field that will automatically be resolved to as part of the behavior of generated toString methods. That really isn't what alias this is used for commonly. I.e. struct ValueReference { private { SomethingElse* impl; } bool isNull() { return impl is

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

2021-08-07 Thread someone via Digitalmars-d-learn
On Sunday, 8 August 2021 at 00:57:47 UTC, Paul Backus wrote: On Sunday, 8 August 2021 at 00:52:43 UTC, someone wrote: 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 co

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

2021-08-07 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 8 August 2021 at 00:52:43 UTC, someone wrote: 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

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

2021-08-07 Thread someone via Digitalmars-d-learn
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' defau