Is defining get/set methods for every field overkill?


Sun Nov 20 22:37:42 UTC 2022


On Sunday, 20 November 2022 at 12:23:39 UTC, Ali Çehreli wrote:
> On 11/20/22 00:31, [] () {} () wrote:
>
> > Quoted from that video (the one that you agree with):
> >
> > "I don't ever think that private .. private is like just ..
> shouldn't
> > even be used."
> >
> > "so I don't even use classes I just use struct so that
> everything is
> > always public .. and that in my opinion is the correct
> method."
>
> Yes, still agreeing with it.
>
> > If anyone wants to learn more about why encapsulated types
> > (classes) have shown to be so useful in my many years of
> programming,
>
> Hm. 'private' is about access control. Encapsulation is 
> something else.
>
> > they can first pay me my fee.
>
> If I could, I would like to pay to have less of that please. :)
>
> Ali

so, as I understand it, your're against the use of private, 
against the use of class, and against the use of encapsulation.

we have nothing more to discuss..

.. good luck with your career as a software engineer (but please, 
for all our sakes, don't work on any safety-related systems, and 
especially not the ones running in my car).






More information about the Digitalmars-d-learn mailing list