www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - what is the state of property-functions?

reply Martin <martin.brzenska googlemail.com> writes:
I would like to point out that the documentation for 
property-functions needs improvement: 
https://dlang.org/spec/function.html#property-functions

Cool, this feature is what i just needed -> me, happy
Then i see the warning -> mental pain

This is a very unpleasant situation. Should i use it? Should i 
not? How long is the Warning there already, is it still valid? - 
a review is mentioned but no link to the process is given. This 
telling me basically: There are property-functions, but there are 
$kind_of_broken, you can use it - but maybe it will be removed 
tomorrow.. or next year, or never. :)

TL;DR
The Documentation raises more questions than it answers.
What is the state of property-functions?
Feb 06 2021
next sibling parent Adam D. Ruppe <destructionator gmail.com> writes:
On Saturday, 6 February 2021 at 20:21:16 UTC, Martin wrote:
 What is the state of property-functions?
It works ok for basic cases. Broken cases include: foo.prop += 5 // you must do foo = foo + 5 foo.callable_prop(); // if it returns a callable, you prolly have to use double parens to actually call it, foo.callable_prop()() &foo.prop // gives a delegate, unless it returned ref Otherwise it really isn't too bad just you don't need the property annotation itself, all it actually affects is typeof(foo.prop) and like override mangling. So if you never used property you probably wouldn't care too much. If you do use it, be aware of the three potential gotchas above and be advised if you do some kind of hack to work around this, you thing might break some time around the year 2245 at the current rate of progress. Maybe the crew of the starship Enterprise will have their code break when property's "definition is more certain and implementation more mature" but you probably shouldn't worry too much about it.
Feb 06 2021
prev sibling parent reply 12345swordy <alexanderheistermann gmail.com> writes:
On Saturday, 6 February 2021 at 20:21:16 UTC, Martin wrote:
 I would like to point out that the documentation for 
 property-functions needs improvement: 
 https://dlang.org/spec/function.html#property-functions

 Cool, this feature is what i just needed -> me, happy
 Then i see the warning -> mental pain

 This is a very unpleasant situation. Should i use it? Should i 
 not? How long is the Warning there already, is it still valid? 
 - a review is mentioned but no link to the process is given. 
 This telling me basically: There are property-functions, but 
 there are $kind_of_broken, you can use it - but maybe it will 
 be removed tomorrow.. or next year, or never. :)

 TL;DR
 The Documentation raises more questions than it answers.
 What is the state of property-functions?
Property functions are currently in a limbo state right now, as the implementation is unfinished. The D language leaders has not comment on the state of properties for years already, as it deemed to be not of top priority. The current state of it is considered to be obsolete, by other programmers here. You can track my progress of finishing the implementation of it here: https://github.com/dlang/dmd/pull/12097 Currently it is on hiatus as the debugging information provided by dmd is god awful. I am currently working on improving the debugging experience for visual studio, by focusing on the debug info that is generate by dmd. -Alex
Feb 06 2021
next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Saturday, 6 February 2021 at 20:43:27 UTC, 12345swordy wrote:
 On Saturday, 6 February 2021 at 20:21:16 UTC, Martin wrote:
 [...]
Property functions are currently in a limbo state right now, as the implementation is unfinished. The D language leaders has not comment on the state of properties for years already, as it deemed to be not of top priority. The current state of it is considered to be obsolete, by other programmers here. You can track my progress of finishing the implementation of it here: https://github.com/dlang/dmd/pull/12097 Currently it is on hiatus as the debugging information provided by dmd is god awful. I am currently working on improving the debugging experience for visual studio, by focusing on the debug info that is generate by dmd. -Alex
Hero (for trying to improve debugging)
Feb 06 2021
prev sibling parent reply IGotD- <nise nise.com> writes:
On Saturday, 6 February 2021 at 20:43:27 UTC, 12345swordy wrote:
 Property functions are currently in a limbo state right now, as 
 the implementation is unfinished. The D language leaders has 
 not comment on the state of  properties for years already, as 
 it deemed to be not of top priority. The current state of it is 
 considered to be obsolete, by other programmers here.
What is the current status, is the D project going to pursue properties and do a full review how it can be implemented or is this feature going to be deprecated?
Feb 06 2021
parent 12345swordy <alexanderheistermann gmail.com> writes:
On Sunday, 7 February 2021 at 00:40:17 UTC, IGotD- wrote:
 On Saturday, 6 February 2021 at 20:43:27 UTC, 12345swordy wrote:
 Property functions are currently in a limbo state right now, 
 as the implementation is unfinished. The D language leaders 
 has not comment on the state of  properties for years already, 
 as it deemed to be not of top priority. The current state of 
 it is considered to be obsolete, by other programmers here.
What is the current status, is the D project going to pursue properties and do a full review how it can be implemented or is this feature going to be deprecated?
Neither. They deemed it not important right now. -Alex
Feb 06 2021