3 ms·
"So in the bottom of the ninth, we decided to transliterate our 90k lines of Python directly to Go, line by line." A question here: Is it always a practical ap
by adem 12y ago
"So in the bottom of the ninth, we decided to transliterate our 90k lines of Python directly to Go, line by line."
A question here: Is it always a practical approach to transliterate line by line when transitioning to another language or because "Go [is] semantically very similar to Python"?
- avenger123 12y agoUsually it's too much work to do a refactor with the new language and a conversion. Much easier to convert first (with whatever warts the existing code base has) then do a refactor. So I doubt their approach had too much to do with Go per se and more with wanting to get something out sooner rather than later.
- kazagistar 12y agoBoth language semantics and language best practices are pretty similar in Python and Go, and I am sure this helps a lot. Transliterating to something like Java would be hard because their interfaces work differently enough from duck typing to force a lot of refactoring. And switching to something even more different, like Haskell or Clojure, would just make transliteration impossible.
- saurik 12y agoI once consulted for a company whose previous consultant had tried to help them do a line-for-line translation (using off-site random-people-in-a-sweatshop online programmers for hire) from ASP to Rails. They pitched it as "transcoding". I will argue that this was not practical (though I can appreciate the idea that at first glance it almost sounds amazingly scalable ;P).