Java 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.
It’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.
One 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.
>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.
If you clicked the link from the person I was responding to, and read that article, you would know why my comment is relevant.
I'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."
The 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.
That 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.
Re:IBM introduces z15 mainframe
by neverartful on Sunday September 15, 2019 @11:27AM
(#20977633)
This 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.
Re:IBM introduces z15 mainframe
by AnimalMuppet on Sunday September 15, 2019 @09:45PM
(#20980517)
> COBOL really excels at foxed point decimal operations
That's one of the best typos I've ever seen.
https://medium.com/@bellmar/is-cobol-holding-you-hostage-wit...