4 ms·
If it's such a big industry how come no one has written something that translates COBOL to a modern language?
by andr 18y ago
If it's such a big industry how come no one has written something that translates COBOL to a modern language?
- greggraham 18y agoI searched and found products to convert to C (http://www.mpsinc.com/cob2c.html http://www.mpsinc.com/cob2c.html) and to Java (http://www.jazillian.com/howCOBOL.html http://www.jazillian.com/howCOBOL.html). However, it is probably easier to maintain the code in the language it was designed in. Also, as the article said, COBOL is very good at what it does.
- jballanc 18y agoWhy? Translation would only introduce bugs, and it compiles down to assembly anyway. Better to gradually replace components one at a time (which is, from the article, what seems like is already happening).
- gaius 18y agoWhy would they? The only "problem" with COBOL is that it's unfashionable.
- maxharris 18y agoNot true - cobol code is often very unstructured. It's very difficult to limit variable scope in cobol, and functions that would normally be a few lines long have so much cobol boilerplate around them that each "function" is usually put into its own source file. Try dealing with "just" 14k lines of cobol that you haven't written; try to make minor changes to it (and wait a minute for your $3000 piece of shit Micro Focus compiler to run) without breaking things. Try getting fed up and spending a year of your life rewriting the code in Pascal. You won't like it, but when you're done, you'll say "thank god i'm free of cobol!" Come to think of it, Micro Focus is usually behind these lame annual PR campaigns to try to drum up talk about cobol. Their business isn't growing. Some reasons: * Installing their product is a big pain. (At least on Solaris/SPARC and Linux.) Bugs in the installer script mean that you have to spend an hour or more on the phone just to install their junk. Support is included with the $3000 fee, but only for a year. So if and when you have to reinstall, prepare to pay a few hundred for the incident. * Their product uses flexlm, and it sucks just like most consumer DRM, only worse, because it's buggy. I imagine that MF sees it as another form of copy-protection. * The compiler doesn't play nicely with make, so when you rebuild your project, object files that are up-to-date are recompiled anyway. * Interoperability with other languages and database systems is so cumbersome that you'll just end up writing output into some cumbersome flat text file, and have the rest of your system poll it to display progress from to your cobol program. * The free/OSS cobol compilers won't compile non-trivial systems. If you still think that the only problem is that it's "unfashionable", there are two possibilities: either you don't really know much about cobol (haven't used it in a real production environment), or you don't know much about anything but cobol.
- blasdel 18y agoApparently COBOL does have Macros: http://smuglispweeny.blogspot.com/2008/03/kenny-and-firing-squad-episode-ii-cobol.html http://smuglispweeny.blogspot.com/2008/03/kenny-and-firing-s...
- maxharris 18y ago> Their product uses flexlm, and it sucks just like most consumer DRM, only worse, because it's buggy. I imagine that MF sees it as another form of copy-protection. I meant that they see the bugs as a form of inadvertent copy-protection because their resolution requires a support call.
- gaius 18y agoYou can make a list like that about any language - there are plenty of things wrong with Java too, such as the amount of boilerplate code required for EJBs, or the fact that the fragile superclass problem still hasn't been solved, or there are application servers with stupid licensing. I can't see COBOL being much worse than Java for any real-world project.
- maxharris 18y agoFirst, it's not a very large industry. And the technical problem is very difficult to solve - you have many different versions (from each decade) of the language to be compatible with. But most importantly, think about the result of success - translating cobol successfully to a modern language means that your customers don't need your product once they're done. This is why MF does lame PR once a year - they want to keep businesses from modernizing away from their product.