Is defining get/set methods for every field overkill?


Sun Nov 20 08:31:14 UTC 2022


On Saturday, 19 November 2022 at 19:40:43 UTC, Ali Çehreli wrote:
> ..
> (I fully agree with the posted video.)
> ...


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."

Now, after thoroughly examining that rant, I better understand 
his agenda.

It's hard for me to conceive how a someone who thinks of themself 
as a 'software engineer' could agree with this.

anyho.. If anyone wants to learn more about why encapsulated 
types (classes) have shown to be so useful in my many years of 
programming, they can first pay me my fee.


More information about the Digitalmars-d-learn mailing list