Level Up your Rust pattern matching(blog.cuongle.dev)
blog.cuongle.dev
Level Up your Rust pattern matching
https://blog.cuongle.dev/p/level-up-your-rust-pattern-matching
6 comments
The first pattern-matching language I used was Erlang. I generally like Rust's just as much, but Erlang/Elixir's binary-matching syntax was awesome and is sorely missed:
https://learnyousomeerlang.com/starting-out-for-real#bit-syn...
https://lobste.rs/s/3a9e2a/matching_binary_patterns_with_erl...
https://learnyousomeerlang.com/starting-out-for-real#bit-syn...
https://lobste.rs/s/3a9e2a/matching_binary_patterns_with_erl...
I needed this. I have some level of intuitive understanding, but this reference will be great whenever I'm not quite sure if something is possible or not.
[deleted]
Suggest for improvement: If you link a Rust playground, at least make it compilable.
being able to read the article without JavaScript is much better.
Overall good article, but those large match statements are difficult to read.