H
Hal Vaughan
This is more a style question, so I know it's subjective (I hope I don't
start a religious war!), but I'm also interested to know if there is a
trend.
I've noticed that a lot of C++ code shuns lower case and basically tries to
keep variables and functions with as short a name as possible (or at least
one that's easy to type). Functions might be like this:
getval()
ldcfg()
But I've also noticed some code that uses underscores between words:
get_val()
ld_cfg()
And here's the part I'm curious about. It seems to me that more recent code
seems to have the Java influence and is a bit more focused on readability,
so it's more like this:
getVal()
loadConfig()
Is it just me, or does it seem that more code is written like this lately?
I read somewhere that a function name can be 30 characters long but only the
1st 8 characters had to be unique, but my experience with gcc is that it
does fine with the 1st 8 chars being the same (just toyed with it). Does
that have any effect on shorter names or maybe people using different
styles for names?
Just wondering...
Hal
start a religious war!), but I'm also interested to know if there is a
trend.
I've noticed that a lot of C++ code shuns lower case and basically tries to
keep variables and functions with as short a name as possible (or at least
one that's easy to type). Functions might be like this:
getval()
ldcfg()
But I've also noticed some code that uses underscores between words:
get_val()
ld_cfg()
And here's the part I'm curious about. It seems to me that more recent code
seems to have the Java influence and is a bit more focused on readability,
so it's more like this:
getVal()
loadConfig()
Is it just me, or does it seem that more code is written like this lately?
I read somewhere that a function name can be 30 characters long but only the
1st 8 characters had to be unique, but my experience with gcc is that it
does fine with the 1st 8 chars being the same (just toyed with it). Does
that have any effect on shorter names or maybe people using different
styles for names?
Just wondering...
Hal