O language designers, don't make use of "private"/"protected" items a hard error. Make it a warning, at worst, or preferably just make "private" a kind of documentation of intent: http://funcall.blogspot.com/2019/12/i-think-you-left-something-out.html …
-
-
So long as I can access it when I need to, I don't care if I have to spell the access differently.
-
I’m not sure being able to access private fields at all is worth it. You massively increase the scope of the fragile base class problem.
- 1 more reply
New conversation -
-
-
Even if A derives B, A and B can both have a private field foo without name conflicts, because private affects scoping. This is a powerful mechanism to avoid the fragile base class problem.
-
But if private is just a lint, or is overridable in any way, then you open a huge can of worms whereby even *private* modifications to A can break derived classes without warning. Never mess with name resolution!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.