4 ms·
I prefer to use a language's convention, whatever that might be. The language's standard library will expose names using the language's convention, and using a
by pekim 2y ago
I prefer to use a language's convention, whatever that might be. The language's standard library will expose names using the language's convention, and using a different convention for my own code's names would make for strange and confusing looking code.
- pid-1 2y agoWhat if you are creating a new language? Which one would you use?
- ZainRiz 2y agoAvoid casing entirely and use single letter function and variable names Case insensitive, of course
- ReleaseCandidat 2y agoiNVERSEcAMELcASE of course.
- ModernMech 2y agoThat's known as crazy case.
- nijuashi 2y agoor basket case
- thfuran 2y agoCasing is so last century. The future is CnOaNmCiUnRgRENT.
- shrimp_emoji 2y agoUnironically, letter casing was a mistake and it should not exist in any language.
- rerdavies 2y agoCAmelCAse (not to be confused with DromedaryCase, which has one hump).
- Mawr 2y agoThe objectively superior kebab-case of course :)
- ssl232 2y ago> The language's standard library will expose names using the language's convention In Python the logging library is written in camel case (as it was heavily based on log4j) unlike most of the rest of the standard library, but the developers have let it be because fixing it would break backwards compatibility, and in any case PEP 8 [1] says consistency within a module is more important than global consistency. In my opinion they should have fixed it in the move from Python 2 to 3, but I guess they had enough headaches from that. [1] https://peps.python.org/pep-0008/ https://peps.python.org/pep-0008/
- mxsjoberg 2y agowrap the standard library with your own convention obv
- lpribis 2y ago> The language's standard library will expose names using the language's convention Looking at you, C++ STL. Almost nobody names structs/classes all lowercase. This leads to silly style guidelines eg. in the Google c++ style guide: - Name classes PascalCase (even if it's templated) - Except if your class happens to be a templated container type, in which case name it all lowercase.
- shrimp_emoji 2y agoThat is silly. I think C++ went with lowercase because they expected namespaces to disambiguate everything. The last bullet makes it seem like it's because stuff is templated.
- yen223 2y agoIssues arise when you're dealing with multiple languages. Say, if you're working on a Java app (which uses camelCase) backed by a Postgres database (which uses snake_case). Postgres in particular has case-sensitivity quirks if you try to force the use of camelCase table names.