property functions

Steven Schveighoffer schveiguy at gmail.com
Mon May 17 14:56:21 UTC 2021


On 5/16/21 11:47 AM, Adam D. Ruppe wrote:
> On Sunday, 16 May 2021 at 15:12:25 UTC, Nick wrote:
>> Is this warning still valid?
> 
> The @property thing doesn't do much. All it does is change 
> typeof(a.prop) from function over to the return value of the function. 
> (Which actually makes it required for the range empty and front things!)

It used to be required, but we removed that requirement a long time ago. 
It was inconsistently applied (some features required @property, and 
some did not).

-Steve


More information about the Digitalmars-d-learn mailing list