Ask HN: Why do you make class members private?

I know this is something that a lot of people do without thinking about it. So let’s think about it. I want to know the main reasons for making variables and functions in a class private. How is it better? What can happen if you don’t do it? Here are a few possible reasons that I can think of that […]