CamelCase? snake_case? Something else? And why?

  • ufra@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    4 years ago

    It depends on the context but I like Python’s recommendations, particularly the part for modules

    Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.

    https://www.python.org/dev/peps/pep-0008/#function-and-variable-names

    Recently I’ve been diving into composing functions and long camel case descriptive names which I would normally dislike actually seem to work pretty well.