4 ms·
It is listed in the release notes as "[Kernel] Auto infer size of matched variable in bitstrings". You can now just match on `^var <> rest` or `<<^var::binary,
by sabiwara 3y ago
It is listed in the release notes as "[Kernel] Auto infer size of matched variable in bitstrings".
You can now just match on `^var <> rest` or `<<^var::binary, rest::binary>>` without having to explicitly pass the size: `<<^var::binary-size(byte_size(^var)), rest::binary>>`.
You can find more examples in the PR https://github.com/elixir-lang/elixir/pull/13106 https://github.com/elixir-lang/elixir/pull/13106.
- asa400 3y agoGreat, thank you!