Hacker News new | ask | show | jobs
by hubert123 3384 days ago
Just another generic complaint about Go's lack of bloat. It's all completely naive, never understanding why Go doesnt want generics beyond a simple "b-b-but look, the pattern matching of Rust is simple too!" No it isnt simple just because you say it is. It is the opposite of simple. I've read the Rust docs on it several times and I still dont have a clear mental picture of how to read a match statement out loud. "match result with Some(number) .. then do..? But match HOW?" I've been thinking of a clearer syntax/naming for match and in my humble opinion it should literally just be called 'if' and any inconsistency that doesnt align with that be removed from the language. Calling 'match' match is haskell programmers gone wild. Programmers in the real world dont have a clue how to read 'match'
2 comments

If you have the time and inclination, I'd love to know if the second edition of the book makes it more clear to you http://rust-lang.github.io/book/second-edition/ch06-02-match...
I agree a bit, in haskell for example it is not always easy to figure out the computation order, it is about tradeoff and go looks too much on the simpler side.