Calling functions
There's another issue I've so far been skirting over—the syntax of calling functions. Specifically, you may have seen some examples around in which calling a function does not use parentheses to denote the function call. For example, from our previous example, these are equivalent:
iex(3)> MyMath.square(4) 16 iex(4)> MyMath.square 4 16
Why, you ask, is this the case? Why do we have two different acceptable forms? Elixir has a lot of its roots in Erlang. But this is only, so far, as some basic syntax and the runtime. The syntax borrows fairly heavily from Ruby. Thus, there's some Ruby syntactical elements present throughout Elixir, and this happens to be one of the Ruby carry-overs.
As far as when to use one version of the syntax over another is concerned, it depends. I would argue it's mostly a preference of style. If you like to read functions with less braces running around, don't use parentheses to invoke functions. Or, you may like...