Formatting preference

8 Comments

  • Thomas - 7 years ago

    Readability is the highest virtue in the comparison, it brings the highest value. Whether you type one key less or more just can't compare with a high value of readability that extends teams, code adoptions, easy of understanding, ... Underscores in a big way.

  • xavier serrano - 7 years ago

    I feel that the argument that shift is "quicker" its very relative. as it is not every programmer types using the same fingers and we arent all Pro typers. keyboards are different all over the place. we also right code to be easy to maintain not easy to type. at the end you may need to use shift for either solutions and hitting the shift key the same amount of times for both.

  • humpa - 8 years ago

    camelCasePros:
    * shorter
    * less hand movement
    underscore_pros:
    * separation between words, so it's easier to read long names. (can arguably be seen as a con since that enables people with "long-name-syndrome" :D)
    subjective:
    * one of the two looks better

  • Joshua - 9 years ago

    It's a bit close at the moment... I kinda wish that the example was longer and 'harder' to read... :/

  • z - 9 years ago

    If you are a crappy C programmer; camelCase
    otherwise; underscores.

  • Scott - 10 years ago

    at least there's consensus.

  • Tux - 11 years ago

    I find it easier to use camelCase my self too. Since native php function naming is underscore it makes easier to distinguish between your own funcitons and php's functions. But I think CamelCase starting with big instead of small case is good too. Especially for classes.

  • coray - 11 years ago

    onlyCamelCaseWillDo

Leave a Comment

0/4000 chars


Submit Comment