3 ms·
It's garnering downvotes because a lot of HN readers have never worked with a very large and mature codebase before and understand just how crazy a migration is
by alfalfasprout 6y ago
It's garnering downvotes because a lot of HN readers have never worked with a very large and mature codebase before and understand just how crazy a migration is. They seem to think that writing in Rust magically eliminates most bugs. No... it eliminates certain classes of bugs but instead you get plenty of logical bugs.
The number of new bugs introduced in a migration would be enormous. It's not just "translating" the C into Rust-- you ideally need to write "idiomatic" Rust.
Rust is a fantastic language but what I despise about its community is how they seem to think every C/C++ codebase should be rewritten in Rust. Either it's a monumental effort or it would decrease the developer base in many cases. In the case of C++ template libraries then it's in some cases even impossible to replicate functionality.
- zozbot234 6y ago> In the case of C++ template libraries then it's in some cases even impossible to replicate functionality. Rust has procedural macros that can replicate anything C++ templates can do, often more cleanly. And C/C++ are hardly immune from logical bugs.
- ncmncm 6y ago> "Rust has procedural macros that can replicate anything C++ templates can do" This is an entirely false statement. Wishful thinking makes a poor substitute for knowledge. Promoting wishful thinking against facts does all readers a disservice.
- tedmielczarek 6y agoHaving been significantly involved in the work to integrate Rust into Firefox I can say that while it's definitely nontrivial it's absolutely worthwhile. Every C++ developer I knew at Mozilla that took the time to learn Rust wound up being impressed with it and preferring to write Rust over C++.