3 ms·
>The large "rewrite in language X" projects, [...] significant cost of time, effort and users. Well... if you're pre-qualifying the hypothetical rewrite with "
by jasode 3y ago
>The large "rewrite in language X" projects, [...] significant cost of time, effort and users.
Well... if you're pre-qualifying the hypothetical rewrite with "large", that already means we take as a given it will require significant time & effort. (Unless there's a sufficiently smart automatic transpiler tool like a future ChatGPT-v17.)
There have been some successful big rewrites. Google rewrote the web crawlers from Java to C++. They also rewrote the search results front page from Java to C++. Microsoft rewrote C# compiler from C++ to C#. Go rewrote the compiler from C to Go.
In any case, for curiosity... I ran the CLOC tool to count lines-of-code in the main NGINX repo ./src/* subdir. A project to convert ~165k of C to Rust is small enough to be doable by a small team. "Small" being 1 or 2 developers. (I'm not recommending they rewrite in Rust but just comparing the scope of the work to the resources.)
Semi-related footnote is Cloudflare replaced NGINX with in-house Pingora and that was written in Rust: https://hn.algolia.com/?q=pingora https://hn.algolia.com/?q=pingora
-----------------------------------------------------------------------------------
Language files blank comment code
-----------------------------------------------------------------------------------
C 256 54041 6165 153818
C/C++ Header 134 4810 1077 10041
Perl 2 45 18 112
SKILL 3 24 0 99
Bourne Shell 1 30 5 78
make 1 9 0 21
C++ 1 9 3 19
Windows Resource File 1 3 2 1
-----------------------------------------------------------------------------------
SUM: 399 58971 7270 164189
-----------------------------------------------------------------------------------