Should you use the private access modifier if it's redundant? [closed]

I think explicity stating private helps in readability. It won't allow for a programmer to interpret its visibility differently.


It looks that we are the only one, but personally, I support the let's remove private campaign.

My concern is that public and private are so similar, 6-7 chars length, blue, starting with 'p', so it's much harder to point a public method between 10 explicit private ones than between 10 that have no access attribute.

Also, it's an advantage since lazy people in your team tend to save writing the modifier and making the method private, which is actually a good thing. Otherwise you end up with everything public.

I usually prefer explicit over implicit, but that's more important in language corner cases (tricky cheats) that in a widespread feature. Here I think long-rung maintainability is more important.

Also, I usually like when code is simple and clear in a mathematical way over when the code is explicit in order to preserve future coder's ignorance. That's the VB way, not C#...


Marking it as private makes it clear that it is deliberate, rather than "I didn't actually think about it, so I don't know if it would be better as something else."; so I do like making it explicit. I wouldn't get religious about it, though.

Also - this prevents having to remember rules... members are private by default, (outer) types are internal by default; nested types are private by default...

Make it clear... make it explicit ;-p