Live data from Hacker News

CamelCase vs underscores: Scientific showdown (2011)

whatheco.de

131–138 of 138 posts

Re: CamelCase vs underscores: Scientific showdown (2011)

#131

Earlier quoted context omitted.

iNVERSEcAMELcASE of course.

Casing is so last century. The future is CnOaNmCiUnRgRENT.

Unironically, letter casing was a mistake and it should not exist in any language.

Re: CamelCase vs underscores: Scientific showdown (2011)

#132
post #96
post #35

I'm firmly in the camp that doesn't care what the rule/style is, I just want an unambiguous rule. I'll just use whatever the language conventions are. Snake case in Java, for example, would be a hate crime. So would camel case in C. My general preferences beyond that are: - Opening braces on the same line (I see the article has examples where it's on a new line); - Two space indent, no tabs - No trailing white space.…

I've gone for tabs ever since I realized it helps with accessibility https://gomakethings.com/tabs-are-objectively-better-than-sp... Every developer can control how those tabs are rendered to their preference.

I would love to see a space advocate's response to this, mostly so I can disregard it because they are heathens on the wrong side of a holy war, but also because this is the only argument I've ever heard one way or another which seems to boil down to anything more than opinion.

Re: CamelCase vs underscores: Scientific showdown (2011)

#133
post #52
post #30

I use both but camel case assumes capitalization doesn't have meaning other than as a sort of break indicator, which isn't always the case.

Behold this monstrosity: devDbUrl Madness. The only thing worse that developers willingly tolerate is prettier's sacrilegious linebreaks [0]. 0: https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEBXNc...

42 columns, eh?

Re: CamelCase vs underscores: Scientific showdown (2011)

#134
post #21

Earlier quoted context omitted.

IAgreeThatSnakeCaseIsEasierToRead,ThoughIfWeWereToUseCamelCaseMoreWeWouldBeSavingAGoodAmountOfSpace,WhichMightBeUsefulForNarrowBlocksOfText.I'mSuprisedItHasn'tCaughtOnInProse.Actually,LookingAtThis,MaybeIt'sAGoodThingItHasn'tCaughtOnForProse.

Classical Latin used all caps no spaces, so rather than caught on we moved away from it. https://en.wikipedia.org/wiki/Scriptio_continua

I've read that it such text usually was read out loud. Not sure if doing so actually make it easier to parse, but maybe latin was more phonetically regular than english?

whenwordseparationbecamethestandardsystemitwasseenasasimplificationofromanculturebecauseitunderminedthemetricandrhythmicfluencygeneratedthroughscriptiocontinua

Re: CamelCase vs underscores: Scientific showdown (2011)

#135
post #9

I find snake case so much easier to read, breathing space between words is there for a reason.

Agreed. I started with Java which gave me a bias towards camel case to begin with (as well as braces over whitespace), but have changed to Perl and now Python. Snake case is definitely easier to read, but Python encourages CamelCase for class names, and I see the advantage in mixing for different things.

Re: CamelCase vs underscores: Scientific showdown (2011)

#136
post #4

Underscore is a double-pinky keystroke. As someone who has battled RSI, I stopped using snake case and underscore-prefixed member variables because of the added stress all those underscores place on the weakest fingers.

I have a programmable keyboard which I have bound underscore to LeftAlt+N, input with my left thumb + right index fingers. The first key is functionally not a Left Alt key, it is a layer key that shares the same position as where you would find a Left Alt key on keyboards.

But you do have a point because not everybody has access to programmable keyboards almost all the time. Maybe snake_case isn't that ergonomic now that I think about it, although I find it easier to read than camelCase.

Ultimately, the winner is still kebab-case, which is both aesthetically pleasing and is not a double-pinky keystroke!

Re: CamelCase vs underscores: Scientific showdown (2011)

#137
post #104
post #21

Earlier quoted context omitted.

Classical Latin used all caps no spaces, so rather than caught on we moved away from it. https://en.wikipedia.org/wiki/Scriptio_continua

Japanese also doesn't have casing or spaces, which can make text written solely in hiragana (like some Famicom games) hard to read. I don't know enough about Chinese and Korean to opine on how difficult they are to read and comprehend, but by using the four writing systems (hiragana, katakana, kanji, and western script), Japanese is easy enough to read.

I've seen a few Famicom games do the clause spacing though, so it's easier to read. You can almost hear the emphasis tone on all the particles haha.

And yeah in Japanese it's fine, there's a clear visual situation between the Kanji and Kana.

Re: CamelCase vs underscores: Scientific showdown (2011)

#138
post #21

Earlier quoted context omitted.

Classical Latin used all caps no spaces, so rather than caught on we moved away from it. https://en.wikipedia.org/wiki/Scriptio_continua

My favorite deprecated writing convention is boustrophedon: https://en.m.wikipedia.org/wiki/Boustrophedon

That should totally become the norm. It looks so efficient. Way better than vertical writing systems, etc.
Post reply on HN