Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But see, being used to hyphens in variable names, I must tell you I can't figure out which one I find easier to read. On one hand, the presence of hyphens and subtraction is a tad confusing, but on the other, I find "balance-sheet" to be generally nicer to read than "balanceSheet", so it feels like a tie to me. Then, on the other hand, you have things like "xs.for-each(x -> x + 1)" vs "xs.forEach(x -> x + 1)", where I really like the hyphen.

Anyhow, I feel that this is the kind of feature you just stop noticing after a while. I think we often tend to assume that what we are used to is more readable than what we aren't used to, but the brain will adapt to nearly anything. Doesn't mean we ought to go crazy with changes, but hey, I like hyphens.



> I find "balance-sheet" to be generally nicer to read than "balanceSheet"

Me too, and I've wondered if it's because it's activating the same part of my brain that gets aggravated when people decide to use capitals on seemingly random words within the sentence.


To me it's almost cognitively dissonant to see a capitalized letter in the middle of a word. In written language grammars, we have only capitals at the beginnings of new sentences (new ideas), so my brain sees camelcase terms and wants to separate the words into separate terms.

Also, it feels morally wrong that the first word typically doesn't get the capitalization (and often languages ask/require programmers to follow some arbitrary first letter capitalization rules...). Yes, that's right, it's about ethics in programming language design.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: