2 ms·
For any reasonably complex codebase the complete rewrite is not possible. The first several versions of the rewrite will inevitably lack the functionality pres
by alexeiz 10y ago
For any reasonably complex codebase the complete rewrite is not possible. The first several versions of the rewrite will inevitably lack the functionality present in the original version and have more bugs compared to the original version. In my experience, you can only achieve the feature and quality parity if you continue to work on the code long after the initial rewrite.
Take for example a rewrite of coreutils in Rust. The LS utility in original C (https://github.com/goj/coreutils/blob/rm-d/src/ls.c https://github.com/goj/coreutils/blob/rm-d/src/ls.c) and its rewrite in Rust (https://github.com/uutils/coreutils/blob/master/src/ls/ls.rs https://github.com/uutils/coreutils/blob/master/src/ls/ls.rs) are quite different. The rewrite doesn't implement half of the original options. It's reasonable to assume that not many people even use the rewritten LS, so it contains bugs that the original widely used version doesn't have.
The bottom line is that if you want to achieve comparable quality and features, the time and effort invested in rewriting some code is almost the same as the time and effort invested in creating that code from scratch.
- dragonwriter 10y ago> For any reasonably complex codebase the complete rewrite is not possible. If it's reasonably complex but also reasonably well designed, it can be completely but incrementally rewritten by module, without the problems you describe. OTOH, those are usually the things that there is less pain with the existing system driving by a desire to rewrite. Chances are if you want to rewrite it, it's going to be a nightmare.