[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Re-layout
From:       Guillaume Laurent <glaurent () telegraph-road ! org>
Date:       2001-09-16 15:57:49
[Download RAW message or body]

On Sunday 16 September 2001 16:52, Tim Jansen wrote:
>
> IMHO the "m_" makes things look complicated.

Not in my experience. I agree with Martijn and Hans here, and so do all of 
the C++ programmers I know. The company I work, like many others, has a 
similar convention in its guidelines. It's extremely common.

> My point was that in short
> functions it is always obvious which variable is local.

No, I really don't think so. Especially not with C++ where you can declare 
variables anywhere.

And writing short functions isn't always possible. If you systematically 
break down your large functions into lots of smaller ones, you're more likely 
to complicate the API of a class rather than making its code easier to read.

> If you really want
> a convention you should find a easier one, like the netscape convention of
> using a "m" prefix for members and "a" for arguments.

Whatever, a leading '_' is also very common. The point is, you *need* to have 
a way to clearly distinguish between member and local variables.

-- 
					Guillaume.
					http://www.telegraph-road.org
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic