Poll: do you use @property semantics?

Tejas notrealemail at gmail.com
Fri Sep 30 03:20:31 UTC 2022


On Thursday, 29 September 2022 at 11:53:56 UTC, Dom DiSc wrote:
> On Thursday, 29 September 2022 at 08:40:11 UTC, Quirin Schroll 
> wrote:
>> On Wednesday, 28 September 2022 at 18:47:24 UTC, Sönke Ludwig 
>> wrote:
>>> [...]
>>
>> With other words, you’re setting yourself up to have your code 
>> broken.
>
> Well, sort of. But in hope to get something more useful as it 
> is now.
>
> But what a suggestive question! You either don't use 
> @properties so the feature is useless and can be thrown away, 
> or you use them and then be blamed to shoot yourself into your 
> foot.



To be fair, the language spec does recommend **not** using it

> WARNING: The definition and usefulness of property functions is 
> being reviewed, and the implementation is currently incomplete. 
> Using property functions is not recommended until the 
> definition is more certain and implementation more mature.

https://dlang.org/spec/function.html#property-functions


More information about the Digitalmars-d mailing list