4 ms·
One thing I have heard about COBOL is that it has a built in, decimal fixed point type. Very few of the modern languages have an native type like this. Having a
by RcouF1uZ4gsC 6y ago
One thing I have heard about COBOL is that it has a built in, decimal fixed point type. Very few of the modern languages have an native type like this. Having a decimal fixed point type makes monetary calculations easier to do more reliably.
- dragonwriter 6y ago> One thing I have heard about COBOL is that it has a built in, decimal fixed point type. Very few of the modern languages have an native type like this.. What modern language doesn’t have either fixed-point or arbitrary-precision decimals (or both) in either the core language or standard library? I mean, sure, C doesn’t (and I don’t think C++ does), but those aren’t particularly modern languages.
- RcouF1uZ4gsC 6y agoIn don’t think that Java fits the bill either in this regard. White it does have BigDecimal in the standard library, it is both slower(because object and supports arbitrary precision) and more cumbersome (no operator overloading ) than a native type.
- zozbot234 6y agoI can see a case for decimal floating point types, but fixed point adds nothing beyond what can be performed directly via arithmetic on the underlying integers. It's basically a convenience feature.
- int_19h 6y agoMost things in modern programming languages are convenience features; loops are basically if+goto etc.