Just curious why the C++ standard library uses all lower case and underscores instead of camelCase
or PascalCase
naming convention.
Personally, I find the latter much easier to deal with when typing out code, but is there some kind of legitimate reason to use the former?
The C++ Standard Library provides several generic containers, functions to use and manipulate these containers, function objects, generic strings and streams (including interactive and file I/O), support for some language features, and functions for everyday tasks such as finding the square root of a number.
The C++ Standard Library can be categorized into 3 components: containers, iterators, and algorithms.
Main reason : To keep compatibility with the existing code, since they have done it with C also.
Also have a look at these C++ Coding standards, which presents some generic reasoning regarding the importance of convention.
These links discusses about the naming conventions of C/C++ Standard Library.
Convention. They've done it that way all along, since the C days and before...and didn't see a good reason to break from that convention (not to mention potentially break compatibility with tons of existing code) just to add caps to a bunch of function names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With