Hacker News new | past | comments | ask | show | jobs | submit login

In terms of readability, how much is it due to Rust having ADTs and pattern matching over them?



You 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!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: