Programing Style: camelCase vs snake_case
Note: this essay is unfinished.
i'm the type of guy who is deeply obsessed with trivia, like, camelCase vs snake_case.
over the past few years, i've eagerly read anything written on the subject that hit me. Here's a few generic ones, discarding those language specific guides.
[An Eye Tracking Study on camelCase and under_score Identifier Styles By Bonita Sharif And Jonathan I Maletic, Department Of Computer Science, Kent State University. At http://www.cs.kent.edu/~jmaletic/papers/ICPC2010-CamelCaseUnderScoreClouds.pdf , accessed on 2015-09-07 ]
[To CamelCase or Under_score By Dave Binkley, Marcia Davis, Dawn Lawrie, Christopher Morrell. At http://www.cs.loyola.edu/~binkley/papers/icpc09-clouds.pdf , accessed on 2015-04-15 ]
[Why the Twisted coding standard is better than PEP8 (although you still shouldn't care) By Glyph Lefkowitz. At http://glyph.twistedmatrix.com/2012/10/a-tired-hobgoblin.html , accessed on 2015-04-15 ]
[IHateCamelCase By Yossi Kreinin. At http://yosefk.com/blog/ihatecamelcase.html , accessed on 2015-04-15 ]
after reading them all, all the reasons are like hogwash.
Back to early 1990s, i'm deeply a believer of the snake_case. Because, that is a unambiguous and reversible way to map space-separated words into computer languages shortcomings of not allowing space. Some are thinking, lisp-style-with-hyphen-is-best, but actually no, because hyphen is used in English too. So, by using hyphen as separated, you create the ambiguity of a phrase that has hyphen in the first place. For example,
But then, around 2009 or so, i started to like camelCase. Because, it's really convenient to type.
But even so, convenience of typing shouldn't count, because that's the keyboard problem, a completely separate issue, which can be easily solved. For example, i use a emacs key system that ...........
and, but, some say camelCase is harder to read than under_score. That's bullshittish, because, words used in computer lang are identifiers. When
you_start_to_to_have_long_names_like_this, the underscore camp gets edgy, because, you are not really writing prose where each words needs to be read-over, but rather, you have a blob of things that you want to easily identify at a glance — identifiers — get it?
If you have a question, put $5 at patreon and message me.