Search code examples
c++coding-stylenaming-conventionsreadability

isFollowingCamelCaseConventionInCPlusPlus more_import_than_readability?


I'm moving back from Python to C++ for my next project.
I know why I shouldn't and I know why I should. Never mind that debate.

C++ conventionForVariablesIsCamelCaseAndI'mHavingTroubleAcceptingIt as, at_least_for_my_eyes_it's_less_readable_than_the_lower_case_underscored_convention.

Did any of you encounter an article or information claiming programmers should adopt lower_case_underscored convention and abandon the camelCase, even in C++ projects? Or perhaps research that shows that one is indeed scientifically more readable than the other?


Solution

  • There is no agreed upon convention for C++ naming among C++ programmers, however lower case with underscores is used in both the C++ standard library and in boost.


    As for the coding standards document you linked...

    A link to a random company's coding standards that use "Common practice in the C++ development community" as a justification for their standards, yet provide no citation for that statement smells like a false appeal to authority in order to justify the preferences of whoever wrote the document.