Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atom casing #91

Open
elbrujohalcon opened this issue Jun 23, 2020 · 0 comments
Open

Atom casing #91

elbrujohalcon opened this issue Jun 23, 2020 · 0 comments

Comments

@elbrujohalcon
Copy link
Member

elbrujohalcon commented Jun 23, 2020


snake_case for module names, function names, and atoms in general

Use snake_case for module names, function names and atoms in general and avoid uppercase letters in them.

-module(good_module).

good_function_name(a_good_atom) ->
    {ok, [is, a, reasonable_atom, to, use].

badFunctionName(a_Bad_Atom) ->
    try tO:avoidTheUsage() of
        pascalCase -> or_Bad_Snake_Case
    catch
        _ -> 'please!'
    end.

Reasoning: This is the convention adopted by most open-source erlang projects (and by OTP itself, to some extent). Using it would make your code more clear and readable for everybody.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant