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

List:       kde-devel
Subject:    Re: Re-layout
From:       Tim Jansen <tim () tjansen ! de>
Date:       2001-09-16 13:46:03
[Download RAW message or body]

On Sunday 16 September 2001 01:11, Martijn Klingens wrote:
> Yup. But this serves another purpose. When reading the code you can
> instantly see whether you are dealing with a local variable in the function
> (or even a global variable) or a class data member instead.

Other people would argue that if you need this to find out whether a variable 
is local or not then the naming is not your problem but your function.

To quote Linus Torvalds (/usr/src/linux/Documentation/CodingStyle):

Functions should be short and sweet, and do just one thing.  They should
fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24,
as we all know), and do one thing and do that well.
...
Another measure of the function is the number of local variables.  They
shouldn't exceed 5-10, or you're doing something wrong.  Re-think the
function, and split it into smaller pieces.  
...

bye...
 
>> 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