2 ms·
I tend to prefer camelCasing even in Python, etc. It seems that underscored_names may be easier to read but camelCasedNames are easier to write. The crux is tha
by steamer25 17y ago
I tend to prefer camelCasing even in Python, etc. It seems that underscored_names may be easier to read but camelCasedNames are easier to write. The crux is that, for me, it's harder to write underscored_names than it is to read camelCasedNames.
Can anyone point out advantages of underscored_names that I may be missing?
- binspace 17y agoMatz chose underscore_casing in Ruby because non-english speakers have an easier time reading underscore_cased words. One can also make the argument that code is read more often than written.
- yangyang 17y ago> underscored_names may be easier to read but camelCasedNames are easier to write Code gets read more than once. If it makes code easier to read, I'll do it, even if it takes me a tiny bit longer to write that extra character.
- jsharpe 17y agoAgreed. As has been said many times, code is much easier to write than it is to read (or debug), so make that sacrifice now.
- _delirium 17y agoI find it harder to type camel-cased names, because I seem to end up mis-timing my shift and ending up with camelcAsed or camelCAsed or even cameLCased names
- ranza 17y agoi tend to use camelCasing in most of my code (php|js). Both class names, methods and properties. I prefix private and protected with _ though