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

use parentheses for zero arity function calls #99

Merged
merged 1 commit into from
Aug 6, 2016

Conversation

BenBals
Copy link
Contributor

@BenBals BenBals commented Aug 6, 2016

Zero arity functions should be invoked using parentheses to distinguish them from variables. The benefits are great, as a function call is a way more complex part of a program than using a variable so I believe it's important that those calls can not be mistaken for simple variables.

In a future version of Elixir not doing this will produce a compiler warning, so I think it's oblivious that this is also the opinion of the core team.

Source: Andrea Leopardi (@whatyouhide) on the ElixirFountain at 24:30 (I am trying to find a better source)

@whatyouhide
Copy link
Contributor

That's a great source 😄 Other than that, here's the PR where this was introduced and the related issue :)

@knewter knewter merged commit 7eb6e4f into christopheradams:master Aug 6, 2016
@knewter
Copy link
Collaborator

knewter commented Aug 6, 2016

❤️

@BenBals BenBals deleted the patch-1 branch August 7, 2016 08:36
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

Successfully merging this pull request may close these issues.

3 participants