[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Miscellanous stuff
Jan Ekholm wrote:
>>Hungarian notation: IMHO if your code benefits from this, then you have
>>a real problem. The type of a variable should be obvious from its
>I prefer Hungarian for some parts of my _members_. I use it only for
>members in classes, as these have a kind of global scope within a class.
Ok, agreed.
>Normally GUI widgets all get prefixed by 'btn', 'xpm', 'lb' etc (button,
Ok, actually I also do that (because there's usually quite many widgets in
one class).
>pixmap, and listbox). I also _always_ prefix members with a 'm_'. So a
>listbox would be like 'm_lbServers' for a listbox with some kind of
>servers. Using 'm_' makes it easy to do methods that set some member,
>like:
>
> Foo::setBar (int Bar) {
> m_Bar = Bar;
> }
>
>You don't have to rename the parameter to 'NewBar' or similar, and you
>always recognize your members and don't mix them up with local variables.
Somehow nice. I don't know yet if I really like it .... Have to do some
more thinking.
Christian
--
Drive A: not responding...Formatting C: instead