I understand the general Erlang conventions for functions are using snake case or camel case, but what about exported functions?
For example, say I have a gen_server module that defines a check to see if a username is in use:
-
I have a call along the lines of
handle_function(is_username_in_use, UserName)
. -
I also have an exported function named
is_username_in_use
that callsgen_server:call/2
.
But internally I also define a method that checks a database. So I end up with something along the lines of check_if_username_is_in_use_in_db
for internal use.
It quickly gets out of hand, and I end up with uncomfortably long names. Is there a common convention used to name functions like these? I was thinking something along the lines of is_username_in_use_internal
Best Answer
From official Erlang Programming Rules:
Also this project helps you programmatically to be compatible by those rules.