Is defining get/set methods for every field overkill?
Wed Nov 23 22:43:54 UTC 2022
On Wednesday, 23 November 2022 at 13:24:37 UTC, Tejas wrote:
>
In fact that author of that article wrote this in his blog:
"For one, we want to ensure that private members aren’t
manipulated outside of class declarations with hundreds or
thousands of lines in between. "
Yes. That is where we agree.
Where we disgree, it seems, is that I do not want to have to
completely refactor my modules in order to achieve this, as he
explains in his blog.
This refactoring is required before you can have a true class
type in a D module.
That is, a type with its own perimeter.
No wonder people are 'surprised when they come to D'.
I mean, who wouldn't be?
More information about the Digitalmars-d-learn
mailing list