September 15, 2022
On 9/14/22 21:20, Rikki Cattermole wrote:
> Recently Walter has been wanting to remove language features that don't need to be kept to simplify the language.
> 
> It seems everybody agrees that binary literals are not a worthy candidate for removal, but one thing that I kept thinking about was @property. As far as I know, hardly anyone actually uses its semantic behaviors, and the ones that it does have which are incomplete are special cases that don't benefit us all that much.
> 
> I was going to post this yesterday, but it turns out I am not alone in thinking this can be removed safely (can be swapped to a UDA to prevent code breakage without any language additions).
> 
> So, who uses @property semantics?
> 
> https://dlang.org/spec/function.html#property-functions

I am pretty sure many (most?) people who rely on those semantics are oblivious to it because @property is in third-party code, so not much will come from this thread.

Anyway, if you want to break everyone's code over this why not just fix @property so it becomes actually useful instead?
September 16, 2022
On 16/09/2022 6:16 AM, Timon Gehr wrote:
> Anyway, if you want to break everyone's code over this why not just fix @property so it becomes actually useful instead?

I don't, but if something has to go... Better it be something that people out right don't intend to use or know what it does do.
September 16, 2022

On Wednesday, 14 September 2022 at 19:20:04 UTC, Rikki Cattermole wrote:

>

Recently Walter has been wanting to remove language features that don't need to be kept to simplify the language.

It seems everybody agrees that binary literals are not a worthy candidate for removal, but one thing that I kept thinking about was @property. As far as I know, hardly anyone actually uses its semantic behaviors, and the ones that it does have which are incomplete are special cases that don't benefit us all that much.

I was going to post this yesterday, but it turns out I am not alone in thinking this can be removed safely (can be swapped to a UDA to prevent code breakage without any language additions).

So, who uses @property semantics?

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

I rarely set out to use property initially however it is very useful as a way to insert (say) logging and debugging scaffolding into other people's code.

September 16, 2022

On Wednesday, 14 September 2022 at 19:20:04 UTC, Rikki Cattermole wrote:

>

Recently Walter has been wanting to remove language features that don't need to be kept to simplify the language.

It seems everybody agrees that binary literals are not a worthy candidate for removal, but one thing that I kept thinking about was @property. As far as I know, hardly anyone actually uses its semantic behaviors, and the ones that it does have which are incomplete are special cases that don't benefit us all that much.

I was going to post this yesterday, but it turns out I am not alone in thinking this can be removed safely (can be swapped to a UDA to prevent code breakage without any language additions).

So, who uses @property semantics?

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

I don’t. Dump it. Replicate VB.NET’s success story with their notion property. Why do I write VB.NET and not C#? Because in VB, properties can have parameters; effectively you hook the obj.propName(args) and obj.propName(args) = value expressions.

Also, because it fits a little, add opCallAssign and friends to D akin to opIndexAssign.

September 18, 2022

No, I don't use @property at all.

September 18, 2022

On Wednesday, 14 September 2022 at 19:20:04 UTC, Rikki Cattermole wrote:

>

So, who uses @property semantics?

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

Hi Rikki,

I am not using it.

-Ikel

September 26, 2022

On Wednesday, 14 September 2022 at 19:20:04 UTC, Rikki Cattermole wrote:

>

Recently Walter has been wanting to remove language features that don't need to be kept to simplify the language.

So, who uses @property semantics?

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

I do - or I would if only they would work - e.g. if x is a property (having a getter and a setter), ++x should work, &x should be an error etc. If it has only a getter or a setter, ++x should not work, but provide a meaningful error message instead of the garbage we get now.
It would be easy to fix this. Makes me really sad.

September 26, 2022
On 9/26/22 11:50, Dom DiSc wrote:

> if x is a property
> (having a getter and a setter), ++x should work

That came up a couple of times on this thread.

Sounds easy to my ears. Is there a blocker for the implementation?

Ali


September 26, 2022
On Monday, 26 September 2022 at 18:51:41 UTC, Ali Çehreli wrote:
> On 9/26/22 11:50, Dom DiSc wrote:
>
> > if x is a property
> > (having a getter and a setter), ++x should work
>
> That came up a couple of times on this thread.
>
> Sounds easy to my ears. Is there a blocker for the implementation?
>
> Ali

I don't think so. Would be an easy lowering.
Forbidding to take the address is more controversial, but I don't understand why. It would be ambiguous (should it return a value-pointer or a function-pointer?). If you want something you can take the address of, make it a function or a value, not a property.
September 27, 2022
On 26.09.22 20:50, Dom DiSc wrote:
> On Wednesday, 14 September 2022 at 19:20:04 UTC, Rikki Cattermole wrote:
>> Recently Walter has been wanting to remove language features that don't need to be kept to simplify the language.
>>
>> So, who uses @property semantics?
>>
>> https://dlang.org/spec/function.html#property-functions
> 
> I do - or I would if only they would work - e.g. if x is a property (having a getter and a setter), ++x should work, &x should be an error etc. If it has only a getter or a setter, ++x should not work, but provide a meaningful error message instead of the garbage we get now.
> It would be easy to fix this. Makes me really sad.

Also see: https://wiki.dlang.org/DIP24