
On January 15, 2015 12:57:45 PM EST, Beman Dawes
On Thu, Jan 15, 2015 at 10:19 AM, Rob Stewart
wrote: * Prefix function argument names with "a_". Rationale: The "m_" prefix for member names has been a success.
Really? I think it's ugly.
Yes, that's why it is a success. It is ugly so users don't want to use it themselves, so it avoids the shadow warning issue.
I guess that's one way of looking at it.
Despite that the warnings should probably be fixed, I don't think there is need for a naming policy.
Normally, I'd dismiss such warnings as unwanted noise, but given Beman's anecdotal evidence of the benefit of addressing them, I'm inclined to agree that they should be addressed.
It isn't just me; a quick search finds comments like "The clang -Wshadow warning is quite nice as code which trips it often has bugs due to accidentally referencing the wrong identically named variable" and a complaint Apple defaults to no shadow warnings.
Interesting ___ Rob (Sent from my portable computation engine)