K
Kerry Kimbrough
Sun's Code Conventions for the Java Programming Language say that
instance variable (class data member) names should not begin with '_'
(underscore). But why? What is the rationale for this rule?
Within my group, some say this is to avoid conflict with secret
instance variables introduced by the compiler or JVM. But no one
claims to have actually observed this. Moreover, there is a lot of
published code that adopts a contrary convention of *always* marking
private data member names with a leading '_'. So the "secret conflict"
story smells like a superstition left over from the early days of C
compilers/linkers.
Anyone know the real story?
Regards,
Kerry
instance variable (class data member) names should not begin with '_'
(underscore). But why? What is the rationale for this rule?
Within my group, some say this is to avoid conflict with secret
instance variables introduced by the compiler or JVM. But no one
claims to have actually observed this. Moreover, there is a lot of
published code that adopts a contrary convention of *always* marking
private data member names with a leading '_'. So the "secret conflict"
story smells like a superstition left over from the early days of C
compilers/linkers.
Anyone know the real story?
Regards,
Kerry