Main Menu

IHateCamelCase?

Started by Darren Dirt, June 14, 2014, 11:02:15 AM

Previous topic - Next topic

Darren Dirt

Do I, just without realizing it? (Am I just most-familiar with it, having coded mainly in C/Java/JS most of the last 2 decades, only sparingly in PHP for a little while? And never having to set a flag like isIllicitIgloo aka is_illicit_igloo ? Cuz I always hated Microsoft's spelling choice for XMLHeaderRequest... why not XmlHeaderRequest or even xmlHeaderRequest!?)

For example, shouldn't this thread title be iHateCamelCase?



Deep Thoughts, lengthy discussion here:
http://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/

Which I found via:
http://www.google.ca/search?q=snake+case+vs+camelcase

After being (unpleasantly?) surprised by this:
"
# By convention, use snake_case for variable names
snake_case = true
"
@ http://learnxinyminutes.com/docs/ruby/

See also:
http://www.yosefk.com/blog/ihatecamelcase.html
http://en.m.wikipedia.org/wiki/Coding_conventions


Jeepers, in response to this controversy there is even a cool emacs feature:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Glasses.html


...read* links above then discuss...


*please. Read 'em first, most likely your first instinct reply has been said before.




PS: personally, I expect the hardest thing about learning Ruby will be breaking the Hungarian habit , since JS is untyped and I often edit my code outside of an IDE that means HN has been incredibly helpful over the years, but b_will_look_dumb now :p

_____________________

Strive for progress. Not perfection.
_____________________

Mr. Analog

I hate underscores more than camel/Pascal case and I've never run into the problem described mostly because its bad form to use verbs in variable names
By Grabthar's Hammer