3 ms·
I've converted such programs from one language to another. It is not necessary to understand how the program works, only how the language works. What you do is
by WalterBright 10y ago
I've converted such programs from one language to another. It is not necessary to understand how the program works, only how the language works.
What you do is function by function, convert the language by duplicating what it does in the new language. Resist any and all urges to fix it, refactor it, improve it, etc. Just translate.
- chii 10y agoThe problem is if there's some obscure language behaviour that's not documented well, and the code relied on that behaviour. unless you're an expert and knows the language inside out, it's hard to even know such a problem occurred.
- WalterBright 10y agoTrue, but languages tend to be far, far better understood and documented than some random application logic.
- fgonzag 10y agoOne semi modern language to another language is one thing. You could probably transpile the damn thing. Converting batch based, RPG systems to a whole different paradigm, without a test suite covering the edge cases and 0 documentation is another.