3 ms·
In terms of readability, how much is it due to Rust having ADTs and pattern matching over them?
by int_19h 8y ago
In terms of readability, how much is it due to Rust having ADTs and pattern matching over them?
- gavia1 8y agoYou can kind of "fake" ADTs in Go with interface{} and switches, but it isn't all that nice. Rust on the other hand with first-class ADT and pattern matching makes it a pleasure! You also have all the nice advantages of the compiler checking that all branches have been satisfied which catches a lot of bugs at compile time. Go has it's place, and works great in those places, but I don't think this is one of them. I'm pleased we chose Rust and this feels like a great use for it!