5 ms·
Surprisingly there are reasons why running financial type systems in COBOL makes a lot of sense. Evidently COBOL really excels at foxed point decimal operations
by coleca 7y ago
Surprisingly there are reasons why running financial type systems in COBOL makes a lot of sense. Evidently COBOL really excels at foxed point decimal operations more so than other “modern” languages like Python and Java. Porting then off the mainframe isn’t a trivial exercise it seems.
https://medium.com/@bellmar/is-cobol-holding-you-hostage-with-math-5498c0eb428b https://medium.com/@bellmar/is-cobol-holding-you-hostage-wit...
- jeremyjh 7y agoJava has had a fixed point type - BigDecimal - for a couple of decades now. Yes, there are people who don’t know what they are doing using floats for currency.
- neverartful 7y agoThis is true. The mainframe has hardware support for fixed point instructions (I don't know the details). IIRC, the POWER line (p and i) also have hardware support.
- Retric 7y agoIt’s far more than just having a single data type. COBOL was in effect designed for business use so fixed point arithmetic has a lot of support in the language, libraries, and tooling.
- rbanffy 7y agoOne useful way of thinking of COBOL is as a DSL targeted at business operations. Once you do that, it becomes clear Java is not exactly a competitor.
- coldtea 7y ago>Java has had a fixed point type - BigDecimal - for a couple of decades now. Which is neither here nor there. COBOL has end to end support for financial/commercial calculations, and a whole lot more.
- jeremyjh 7y agoIf you clicked the link from the person I was responding to, and read that article, you would know why my comment is relevant.
- coldtea 7y agoI've read that article a couple of weeks before. It still doesn't posit a simplistic "Java has bigdecimal, just ditch COBOL" as the solution. From the article: "When you are a major financial institution processing millions of transactions per second requiring decimal precision, it could actually be cheaper to train engineers in COBOL than pay extra in resources and performance to migrate to a more popular language. After all, popularity shifts over time."
- jeremyjh 7y agoThe entire premise of that article was based on the example of "engineers" trying to port COBOL code to Java and using floats for maths of financial transactions. Yes, they can't say "just use BigDecimal" and still have enough content to be ranked well by Google, but that in fact is the solution to that particular problem.
- mamcx 7y agoThat is like to say in Java you can have nullable types. But because is not in-built any advantage of use it get lost in the noise.
- AnimalMuppet 7y ago> COBOL really excels at foxed point decimal operations That's one of the best typos I've ever seen.