3 ms·
Interesting that he selected "match" as example of a complex Rust feature. To me, "match"/"case" is one of the simplest and cleanest abstractions in programming
by colonwqbang 3y ago
Interesting that he selected "match" as example of a complex Rust feature. To me, "match"/"case" is one of the simplest and cleanest abstractions in programming languages.
- glandium 3y agoHonestly, I've found match more annoying (and I suspect it's more confusing for newcomers), ever since match ergonomics were stabilized. I do see how it helps some simple cases, but it makes things awfully confusing in so many other cases...
- thumbuddy 3y agoThat's wild. First time I saw a match case, if let, and matches! Invocation I was freaking relieved. No by hand type checking in a dynamic language, having to consider corner cases, etc. LSP even autocompletes the cases with a single hotkey. Escape from boilerplate hell.
- ssokolow 3y ago*nod* Aside from the obvious (compile-time guarantees beyond MyPy's ability to offer), the lack of pattern matching and an accompanying ecosystem that evolved in its presence is my number one discomfort when writing Python for things like my QWidget GUI frontends for Rust backends.