by zabzonk · 5y ago · 0 comments
But it's for a rewrite, so:
- you can use the most modern language features. Python 3.9 is less dense than Python 2.7 (E.G: a silly 2.7 example would be https://0bin.net/paste/xpnCov-3#3s2AgDReXpeqG4knegGwdnYNi523... which is 37 lines, the equivalent in 3.9 is https://0bin.net/paste/b4DVZIS5#372LGWNLBJfDUNQGAMsDlJPNlkVy..., down to 25 lines). Also note that it's not just less lines, but way shorter, yet clearer, lines. Something LoC fails to take in consideration.
- you can use the most modern stack. E.G: fastapi is less dense than flask as soon as you use data validation, plus it adds typing for free.
- you know very well the problem to solve so you get it right the first time.
In the article, they clearly measured success by 1:1 porting of the entire code base from Python to Go as closely as it makes sense.