Click to See Complete Forum and Search --> : C/C++ naming


tecknophreak
06-05-2002, 08:06 AM
when naming variables and functions which do most of you use?

a: ICantReadThisSoGood
b: this_makes_it_longer

EscapeCharacter
06-05-2002, 06:09 PM
depends on the data type, usually constants are all caps LIKETHIS, while functions would be LikeThis, and normal variables are like_this or likethis. just depends on what your style is

l01yuk
06-10-2002, 08:27 AM
I tend to use option 2) but really it just depends on what _you_ think is more readable. Just make sure you're consistant as well and you'll be ok.

l01yuk
06-10-2002, 08:28 AM
or, umm, option b: perhaps ;)

tecknophreak
06-10-2002, 12:53 PM
i also posted this in another forum(mostly win users over there) and while most linux users seem to use this_kind, windows users use thisKind for variables.

the shame is, i work with windows users, so 'll prolly end up making thisKind the standard.

thanks for input

scanez
06-10-2002, 01:51 PM
I usually use a combination of both: ThisKind for a struct/class/etc. and this_kind for variables/functions, etc.