KDevApi cleanup

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Nov 1 17:05:05 UTC 2004

On Monday 01 November 2004 13:26, Matt Rogers wrote:
> On Monday 01 November 2004 02:25 am, Richard Dale wrote:
> > On Monday 01 November 2004 05:07, Matt Rogers wrote:
> > > Hi,
> > >
> > > Attached is a patch which changes the d pointer in the KDevApi class
> > > not to use the m_ prefix for members of the d pointer. Since this is
> > > somewhat of a style issue, I'd prefer to have the patch approved rather
> > > than forcing my coding style on a file I only looked through to see if
> > > it needed documenting.
> >
> > The 'm_' prefix naming convention is in common use in the KDE project,
> > and I haven't read anyone saying that its use was deprecated.
> >
> > -- Richard
> True, but i've found that it's not common to prefix variables with 'm_' if
> they're in the d pointer, which these are.
Surely it matters even less if they're in a private class? I don't see what 
problem you're trying to solve here. 

The reason you need a naming convention for public classes, is that with an 
instance variable called 'foobar', it means you can't have an accessor 
function called foobar(). So you rename the instance variable 'm_foobar' in 
order to get over that naming clash. And that seems perfectly reasonable to 

If you rename the instance variable in this case 'foobar', what are you 
proposing to call the access method? Maybe, getFoobar() - but then I don't 
personally like that, and think foobar() is better.

-- Richard

More information about the KDevelop-devel mailing list