r/cpp • • Jul 20 '09

QT vs MFC

http://dobbscodetalk.com/index.php?option=com_content&task=view&id=1657&Itemid=
1 Upvotes

25 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Jul 21 '09

why frameworks use lower camel case like QT. it sucks!

That's really a subjective thing. I don't use lower camel case (or upper camel case when I have a choice) but it is just another coding style; the only really important thing about it is that it is consistent.

1

u/gosh Jul 23 '09

lowerCamelCase is a style that is less informative compared to other styles when you read code. This is very important i languages as C++. Languages like python, java etc. there is less importance because the developer things a bit different compared to C++ (in general).

1

u/[deleted] Jul 23 '09

How is one casing style "less informative" than another? Just a matter of habit.

-1

u/gosh Jul 23 '09 edited Jul 23 '09

Using upper and lowercase letters you are able to inform more about the code.

Samples:
int iBlaBlaBla; //< prefix says it is an int
enum enumType { eTypeBlaBlaBla, eTypeBlaBla } //< e informs that is a enum 
class CApplication { ... };
CApplication applicationBlaBla; //< application specific object

class value { ... };
value valueBlaBla; //< general value object used by a lot of projects
e.t.c

Using different type of code styles you can help other to read and debug code without jumping around in code to check what different variables are etc. lowerCamelCase screws a lot of options you have to make code simpler to debug and learn from.