CamelCase? snake_case? Something else? And why?

  • @nromdotcom
    link
    83 years ago

    I like whatever the accepted standard is for the language I’m using at the time.

    So for python and ruby we’re talking snake_case variables and PascalCase classes, for javascript camelCase variables and PascalCase constructors, for go camelCase for unexported and PascalCase for exported.

    Don’t really see how one might have a personal favorite that they apply to all languages equally.

    • @Adda
      link
      13 years ago

      Exactly this. I have lacked this comment here and was surprised no one has mentioned it earlier. One might prefer one format over the other, whenever there is a standard though, one should immediately switch to it and stick with the standard for the given language. Not what the discussion asked for though, so that might be the reason.