In Line order
1) It
is advantageous to assume that the naming
convention allows you to make an assumption about accessibility
BUT
you cant know with 100% probability unless the compiler always enforces those (and only those) name forms for those access modifiers
( i.e its on a balance of probabilities not a I-know-this-to-be-so 100% knowledge)
You cant assume a .name is always public cos it could be declared ( is protected/private/....).
Though via convention and emerging idiom thats probably the way to bet...
The _ and __ naming is a convenience for a common convention:
2) circumvention rationale: I've two replies to this
a) I cant think of any but thats no guarantee that noone else can have a good reason for wanting to do so
b) Sure, heres some :
scenario/code std where there are no public member (variables) only protected and private; protected are unadorned (.a), private are leading _ ( _a)
scenario where _ and __ names are anathema, all are unadorned (declared with explicit accessibility) ...
Development : still nailing down accessibility . all start with explicit private accessibility and __named ( to denote still flexible), change declaration typing as determine need
(eventually/maybe/never "correct" naming to conform to convention).
Different convention: .name public, .name_ protected, .name__ private ( trailing _ suffixes rather than leading)
3) Chuck likes warnings and they work fine for cases where the warning is warranted. Where they arent, where you have a good reason for doing something is a slightly different way they become a colossal pita. ( or at least obscure real warnings that you do want to know about).
Warnings are an good guiding mechanism though
4) The ., _ and __ naming isnt a meaning; its a convenience conforming to a (common) convention.
Currently you can use it if you prefer ( or follow the convention), ignore it if not , so long as its not a regulation.
5) Maybe so, maybe there are good reasons none of us have thought of..... Keep that thought (:-).
6) The problem with this line of thought is the possibility that as well as avoiding/preventing the bad thing it possibly precludes a diversity of other things as well .
Its the ' there is only the one best way' vs 'This is one way and preferred but we allow others'
guide vs regulation