Are parenthesis recommended for the functions without arguments?

In the latest versions. For the definitions of the functions as well as for calls.

What’s recommended?

1 Like

Hey man, I found it INCREDIBLY helpful to add Dialyxir and Credo to my projects

Dialyzer will help with mismatched types, unreachable code, and other common issues. Whereas Credo will help with code conventions and code smells. Both are great tools and you can even get warnings on VS Code

Using the builtin formatter, parens will be added to calls but not definitions. And there are a whole host of functions (mainly macros) that don’t require parens, like all the def macros and stuff that would generally be considered “keywords.” This is configurable via the :locals_without_parens option.

As you asked, that’s what’s recommended. Otherwise, the answer is do whatever you want to do :smiley:

1 Like