4 ms·
Serious question: COBOL's just a language. How come no one has put together some kind of runtime interpreter, for COBOL, or thought to produce an emulator facad
by beesKneesMan 8y ago
Serious question: COBOL's just a language. How come no one has put together some kind of runtime interpreter, for COBOL, or thought to produce an emulator facade that keeps the business logic of legacy code, but ports it to another platform, architecture, infrastructure?
I look at some of the perfectly cromulent stuff people do with Emscripten [0], and it just blows my mind the things that a browser will run these days. So, why not that?
[0] https://emscripten.org/ https://emscripten.org/
- wtetzner 8y agoWell, there's https://www.gtsoftware.com/products/netcobol/netcobol-for-net/ https://www.gtsoftware.com/products/netcobol/netcobol-for-ne... and https://www.microfocus.com/documentation/visual-cobol/VC30/EclWin/GUID-DEAFFCA6-6D75-4AEA-A3B6-6DF0BDCF3E2F.html https://www.microfocus.com/documentation/visual-cobol/VC30/E...
- spc476 8y agoThere was a link to another article [1] about how COBOL may be better suited to certain mathematical calculations. The article in question presented this iterative function: x[0] = 4 x[1] = 4.25 x[i] = 108 - ((815 - 1500 / x[i-1] ) / x[i-2]) It blew up on iteration 14 using floating point, but COBOL could be programmed to go further (by using more decimal places past the decimal point). [1] https://medium.com/@bellmar/is-cobol-holding-you-hostage-with-math-5498c0eb428b https://medium.com/@bellmar/is-cobol-holding-you-hostage-wit...
- raverbashing 8y ago> may be better suited to certain mathematical calculations No, it isn't. If that's the best excuse they can find for keeping COBOL alive then throw it in the trash already (though I read the article and it's more subtle than that) There are arbitrary precision libraries for multiple languages, both binary and decimal.
- raverbashing 8y ago> for COBOL, or thought to produce an emulator facade that keeps the business logic of legacy code, but ports it to another platform, architecture, infrastructure There are some, but the answer is: because COBOL is opinionated. In terms of verbosity it makes Java look like a Haiku, and it's a weird mix of lower level and higher level constructs. Classes? What are those? Code reuse? It also talks (in weird ways) to things like green screen interfaces and saves data in "records" or builds "reports" (just try to create XML natively in Cobol)
- guitarbill 8y agoCOBOL work doesn't actually pay well compared to other languages, and it isn't that bigger market. Why? If your business logic and requirements haven't changed, why change a running system? Even if you could transpile with 100% accuracy, then you'd lose speed. Maybe you've gained an operational advantage, but there are other ways to do that. On the other extreme, you need to modernize badly, and so a rewrite is actually feasible because you can take advantage of new technologies, especially web and mobile. Between those use-cases, middleware exists which does allow you to bolt on even more awfulness. Finally, businesses die or get acquired. Sometimes good stuff is lost, but equally bad or old stuff is purged. Maybe ironically, that Emscripten URL won't load for me.
- beesKneesMan 8y agoOh, lol! It just redirects to a github page, and I guess they don't listen on port 443. http://emscripten.org http://emscripten.org So much for https everywhere.