In Erlang, it's possible to create a function like this:
test(X) ->
<< 0:(X * 8) >>.
This is not possible to express in Elixir currently except for setting up a separate variable to do the size computation.
We can't support this directly as:
since that would be ambiguous with the:
notation. Fortunately we can support such calculations inside the size specifier:
Thanks to fowlduck for reporting this initially on IRC.
In Erlang, it's possible to create a function like this:
This is not possible to express in Elixir currently except for setting up a separate variable to do the size computation.
We can't support this directly as:
since that would be ambiguous with the:
notation. Fortunately we can support such calculations inside the
sizespecifier:Thanks to fowlduck for reporting this initially on IRC.