@property with opCall

12345swordy alexanderheistermann at gmail.com
Mon Mar 9 13:26:25 UTC 2020

On Monday, 9 March 2020 at 12:14:06 UTC, Adam D. Ruppe wrote:
> On Monday, 9 March 2020 at 10:09:56 UTC, Calvin P wrote:
>> @property exists so many years,   Druntime & Phobos use it  
>> 2280 times. I can't believe it is not recommended.
> They never implemented it right. This opCall type thing was THE 
> case we brought up to introduce @property in the first 
> place.... but it never actually affected this.
> For years, @property did absolutely nothing. We were told to 
> use it for the future. Some people tried to put on a compiler 
> switch to make it do something, but they consistently made that 
> switch do the wrong thing! Then @property got frozen for fear 
> of broken changes. LOL.
> Now @property changes the result of `typeof(a.prop)`... but 
> nothing else.
> @property is one of the biggest WTFs of D's development.

no kidding, d should just copy c# property semantics as the 
current implementation of it is wonky.

Mike attempted to add binary operations to it, but instead close 
his dip pull request and the following dmd pull requested.


More information about the Digitalmars-d-learn mailing list