|
|
|
|
|
by gameswithgo
2047 days ago
|
|
C#s uses these heavily, and most of my professional career has been using C#. I understand the convenience they offer but I do not think they are worth the complexity they add to the language. There is a whole zoo of syntax around them, as the author states arbitrary computation can sneak up on you when you don't expect it, and ultimately all you are doing is creating some shorthand for functions. If you like, make some shorthand for creating a getter/setter pair that link with some field, that would be fine. But keep them functions, so that it is clear that they are functions to consumers. |
|
I have written up some more details here: https://stefan-haustein.com/simplifying-properties