Are properties mature enough?

QueenSvetlana svetlanalilyrosemond at gmail.com
Sun Aug 19 18:32:17 UTC 2018


In the D Style Guide, it says:

Properties
https://dlang.org/dstyle.html#properties

Functions should be property functions whenever appropriate. In 
particular, getters and setters should generally be avoided in 
favor of property functions. And in general, whereas functions 
should be verbs, properties should be nouns, just like if they 
were member variables. Getter properties should not alter state.

In the Properties function section, it says:

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

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.

So which is it?


More information about the Digitalmars-d-learn mailing list