So yes, the question basically says it all. What do you get when you make sure that private members / methods / regardless of whether they are marked as private (or protected, or public, or internal, etc.) Accordingly?
I mean, of course, I could just mark all my methods as public, and everything should work fine. Of course, if we talked about good programming practice (by the way, I am a solid supporter), I would call the method closed if it should be marked as such, without question.
But put aside good programming practice and just look at it in terms of actual quantitative gain. What do I get to correctly define my methods, members, classes, etc.?
I think that this will mainly lead to increased productivity, but I would appreciate it if someone could provide more detailed information about this.
(For the purposes of this question, I think more about C # .NET, but hey, feel free to give answers to any language / frame that you find appropriate.)
EDIT . Most of them noted that this does not lead to an increase in productivity, and, looking back, I do not even know why I thought so. Probably lack of coffee.
In any case, any good programmer should know how the right areas (1) help maintain your code / (2) control the proper use of your library / application / package; I was curious to find out if there was any other benefit from this, which is clearly not obvious. Based on the answers below, it looks like it basically boils down to just these two things.