1
respex
3y

Code is read more that it is written.
So snake_case > camelCase.
Fight me!

Comments
  • 0
    Valid. I use both. snake for variables and camel for methods/functions/classes.
  • 6
    I think you're implying that one is easier to read than the other while it's the opposite for writing. You'd have to prove that first for the argument to make any sense.
  • 1
    I'm happy to read syntax anyway that the language says is best practice. Camelcaae is shorter but snakecase spreads out words. We read language with spaces between words (with some exceptions), so why not read variables the same way?
  • 1
    *than
  • 2
    I have the opposite view.

    camelCase is perfectly readable - the upper case letters make the word boundaries crystal clear, as much so as snake case. But it also takes up less space, therefore you can fit more code in a line and therefore read more without scrolling.

    I therefore think it's equivalent on readability, but camel wins out on compaction.
  • 2
    "We use Snake_Case Here"

    🚩🚩🚩🚩🚩🚩🚩
  • 2
    camelCase is not harder to read than snake_case! fightMe!
  • 1
    Of all the things to care about in clean code, this is way down there
  • 0
    I use camelCase while working with js and snake_case while working with python, I've no issue with any of them.
  • 2
    Respect the language/project/framework conventions.
  • 1
    @Lyniven Yeah, most definitely. That trumps everything else.
  • 1
    Far more important than my opinion on the topic is the fact that this is not even close to valid reasoning and you're supposedly (probably) an engineer or scientist.
Add Comment