4 ms·
> I wonder if someone has written a Python-to-Cobol translator so that you can program using regular math notation and then translate that into wordy Cobol. Ye
by shakna 6y ago
> I wonder if someone has written a Python-to-Cobol translator so that you can program using regular math notation and then translate that into wordy Cobol.
Yes. But worse. And used in the real world.
Whilst I cannot give all the details for obvious reasons, when I was assisting a particular bank with translating some of their stack from COBOL to modern Fortran, part of the problem was that a large amount of their COBOL code was actually generated.
It wasn't a Pythonish-to-COBOL, though. It was a mix of the C-preprocessor and Bash that generated the COBOL code.
(Problem for me was that all source code was printed, and not stored anywhere digitally, so I had to restore that evil Bash/CPP script just to be able to restore the code I had to retype by hand).
- CountHackulus 6y agoThis is more common than you might think. Back when I worked on a COBOL compiler at IBM one of our test cases was an "expert system" that turned ~20 lines of business-specific DSL into ~100k lines of COBOL. It was extremely un-fun to deal with.