4 ms·
What were the differences between the Go and Rust versions that led you to choose the Rust version in the end?
by ryanworl 8y ago
What were the differences between the Go and Rust versions that led you to choose the Rust version in the end?
- buro9 8y agoGiven that I wrote the Go version and RReverser wrote the Rust version, I'm going to go with: A better engineer wrote the Rust version. But actually I was excited by Rust too. The memory safety, performance (the Rust was faster) and the degree of control over how we could present the FFI to the languages we needed to integrate with, in addition to how readable the Rust was by comparison to the Go code (readable, but so much of it), and then avoiding the GC... the Rust implementation was a convincing winner.
- int_19h 8y agoIn 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!
- deleted 8y ago[deleted]