October 02, 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.

October 01, 2022
On 9/30/2022 6:22 PM, deadalnix wrote:
> Can we fix instead?
> 
> The current situation is ripped with problems.

Make a proposal.

October 01, 2022
On Saturday, 1 October 2022 at 16:50:24 UTC, rikki cattermole wrote:
> 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.

Yup. But the question was what it SHOULD gain over a pure comment.
And the above is what I expect it to provide.
October 02, 2022
On 10/1/22 21:00, Walter Bright wrote:
> On 9/30/2022 6:22 PM, deadalnix wrote:
>> Can we fix instead?
>>
>> The current situation is ripped with problems.
> 
> Make a proposal.
> 

https://wiki.dlang.org/DIP24
October 01, 2022
On Saturday, 1 October 2022 at 19:00:13 UTC, Walter Bright wrote:
> On 9/30/2022 6:22 PM, deadalnix wrote:
>> Can we fix instead?
>> 
>> The current situation is ripped with problems.
>
> Make a proposal.

Timon did like 10 years ago.
October 01, 2022

On Saturday, 1 October 2022 at 16:50:24 UTC, rikki cattermole wrote:

>

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 specifically, all of these things kinda apply but kinda not to all function, @property or not.

October 02, 2022
On 02.10.22 00:40, Timon Gehr wrote:

> https://wiki.dlang.org/DIP24

Diferentiate "property function" and "plain function", why? Just litle bet more cognitive burden.

October 02, 2022
On 10/2/22 02:05, razyk wrote:
> On 02.10.22 00:40, Timon Gehr wrote:
> 
>> https://wiki.dlang.org/DIP24
> 
> Diferentiate "property function" and "plain function", why?

Because there should be a way to reliably replace fields by functions without refactoring the entire code base.

> Just litle bet more cognitive burden.
> 

The feature has been pretty successful in other languages.
October 02, 2022
On 02.10.22 02:17, Timon Gehr wrote:
> 
> Because there should be a way to reliably replace fields by functions without refactoring the entire code base.

A long time ago D fully support that with more general rule.


October 02, 2022
On 10/2/22 02:44, razyk wrote:
> On 02.10.22 02:17, Timon Gehr wrote:
>>
>> Because there should be a way to reliably replace fields by functions without refactoring the entire code base.
> 
> A long time ago D fully support that with more general rule.
> 
> 

No, and there is no way to make it work.