This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] manage dom-walk_data initialization and finalization with constructors and destructors


Hi,

On Fri, 20 Sep 2013, Trevor Saunders wrote:

> > > very ugly FWIW.  I only added the underscores because that's what 
> > > the conventions said.
> > >
> > > But we're never going to get consensus on this kind of thing.  E.g. 
> > > I know some people really hate the GNU formatting style (although I 
> > > very much like it).  So I just held my nose while writing the patch.
> > 
> > Btw, I've come around multiple coding-styles in the past and I 
> > definitely would prefer m_mode / m_count to mark members vs. mode_ and 
> > count_. (and s_XXX for static members IIRC).
> 
> what about a_foo for arguments?

That would go too far.  If we're marking member for reasons of reminding 
ourself that the access involves an indirection (amongst other reasons), 
i.e. it's slower than accessing a local variable, then the same can't be 
said from arguments.  It's just another local variable mostly.  And about 
remembering that it's in current scope, well, it's just there at the very 
top of the function. (Or IOW, we could do without the last 20 years :) )

> I'd prefer m_/s_foo for members / static things too fwiw.

Me as well.  It's still ugly, but not so unsymmetric as the trailing 
underscore.


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]