IMO all their naming convention is shitty.
How I do it:
global variables:
G_STRING_variablename
G_ARRAYCHAR_variablename
local variables:
L_STRING_variablename
L_ARRAYINT_variablename
local pointer:
L_P_INT_variablename
parameters:
P_P_INT_variablename -> this one is a pointer
P_INT_variablename
This way is much easier to know whatever i'm dealing with.
Function names:
always with capslock: DO_XXX_YYY()
the notion of evaluating style guides by anything external or "objective" is retarded. it's useful as a way of framing your code so that it's internally consistent. the only real evaluation you can apply to it is essentially whether it contains any logical conflicts, like two conflicting rules applying to something.
the style guide is as good as anything else, but if you don't like it then use another one. if none exists, then use it for lack of an alternative.
You've obviously never had to work in the same project with a bunch of people.
The retarded shit I've seen justifies all the naming conventions you want.
Your style is shit and verbose and makes Hungarian look readable
>>56236666
Are you autistic?
whats the best c++ book?
>>56236666
You could just use a proper IDE. That way you know what you're dealing with without making your code a mess.
Also DON't use globals, holy shit.
>>56236666
i can see it nowfor (std::vector<int>::const_iterator L_STD__VECTOR__INT__CONST_ITERATOR_it = L_STD__VECTOR__INT.begin(); L_STD__VECTOR__INT__CONST_ITERATOR_it != L_STD__VECTOR__INT.end(); ++L_STD__VECTOR__INT__CONST_ITERATOR_it) {
DO_THIS_WITH_INT(*L_STD__VECTOR__INT__CONST_ITERATOR_it);
// etc
}
>>56237441
whoops, forgot the variable name for the vector
I avoid non-const global variables at all cost, name constants (whether global vars or object-like macros) WITH_NAMES_LIKE_THIS.
Regular variables, are namedLikeThis. asAreFunctionsAndMethods(). There's no special naming style for pointers as distinct from regular variables.
And classes have NamesLikeThis.
>>56236666
Fucking kill yourself.
>>56236666
>Function names:
>always with capslock: DO_XXX_YYY()
objectively retarded
>current year
>not using Rust
Enjoy your memory unsafety
>>56237199
hey now, I am hungarian
>>56237199
>>56240325
not related, it's called hungarian notation
back in the days, BCPL required this kind of faggotry, blame it on Simony Karcsibácsi, nowadays, its fugly and useless(plus nowadays most IDEs will cry out loud when you try to mess up data types)
>>56237408
> Don't use globals
Then what should i use, singletons? Lmao.
>>56236666
Quads checked...
I recall the shit storm about Hungarian notation from C++ MFC faggots. Happier times...
If you use C++ btw... fucking kill yourself.
most of c++ style guides have the same problems:
1) mix subjective and objective stuff
2) don't offer any working tooling to enforce stated rules
3) don't deal with pluralizm of the existing ecosystem
>>56236666
wew this should be a clear bait. AUTISM STYLE.
>>56240305
M E M E L A N G U A G E S
>>56236666
camelCase > shitty_unatural_to_type_underscrore
>>56236666
Looks like they are using notepad to code. Their naming scheme is a relic from decades ago.
>>56241792
No you pass the value along in the constructor where it is needed.