7 ms·
I actually often wonder why so many web developers are drawn to Rust. Satisfying a borrow checker just doesn't seem like a worthwhile task when writing web apps
by dom96 8y ago
I actually often wonder why so many web developers are drawn to Rust. Satisfying a borrow checker just doesn't seem like a worthwhile task when writing web apps. Are there things about Go that you feel are bad enough to warrant a switch to Rust?
- smolder 8y agoFor me, I have a fairly complex application sitting behind a http api. Rust allows me to keep the system requirements for an instance of the app low for better economy. (Memory use especially) I actually like the ergonomics of it a lot and have learned to satisfy the borrow checker. I would use it over Java for almost anything. The biggest downside to me is the long iteration times when making a change, compiling, and testing repeatedly.
- mpartel 8y agoPerformance is not the only benefit. You also get freedom from data races, and (arguably) the borrow checker imposes structure that makes the program easier to read and reason about, because it's clearer who "owns" (and can mutate) what, and what is shared. I've missed this property when writing Java and JS even before Rust was a thing, and Go has felt the same.
- Thiez 8y agoExactly, the clear ownership in Rust allows you to skip the defensive copying that so often happens in Java. Of course you get this property in most languages that do not use garbage collection, but I few restrict mutable aliasing.
- leshow 8y agoThe type system is one of the main draws for me.
- deleted 8y ago[deleted]