Poll: do you use @property semantics?

rikki cattermole rikki at cattermole.co.nz
Sat Oct 1 16:50:24 UTC 2022


On 02/10/2022 3:12 AM, Dom DiSc wrote:
> On Friday, 30 September 2022 at 13:30:31 UTC, razyk wrote:
>>
>> What '@property' gains or should gain over '// property'?
> 
> It gives you control over the access to a member
> - you can read it (if there is a getter)
> - you can write it (if there is a setter)
> - you can apply operations on it that both read and write it (like ++ if 
> there is both a getter and a setter)
> - you cannot get its address (use function or variable if you want this)

Important to note that none of these things actually apply to @property.



More information about the Digitalmars-d mailing list