Elixir errors here because there is an ambiguity. It can be parsed as [ integer_to_binary( (5), integer_to_binary(2) ) ] or as [ integer_to_binary((5)), integer_to_binary(2) ].
Elixir has optional parenthesis for function calls, so when it sees a space after the function name it thinks you are calling the function with no parenthesis and the first argument will be parsed as an ordinary expression enclosed in parenthesis.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
iex> integer_to_binary(5, 2)"101"
iex> integer_to_binary (5, 2)
** SyntaxError
--