Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Elixir v1.16 Released (elixir-lang.org)
12 points by clessg on Dec 22, 2023 | hide | past | favorite | 4 comments


I’m continuously impressed by the care and effort that goes into the developer experience of Elixir. Those improvements of the (already pretty great) documentation and the error messages look like they will make a real difference.


Can anyone elaborate on the binary pattern matching change? Listed as this in the blog post, but I don't see it in the release notes: ```improved binary pattern matching by allowing prefix binary matches, such as <<^prefix::binary, rest::binary>>```


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.


Great, thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: