What modern programming language is the best replacement for COBOL

10 points by aks2161989 ↗ HN
What features of cobol made it ideal for business programming ? Which modern programming language has similar features?

8 comments

[ 0.23 ms ] story [ 23.1 ms ] thread
Caution I'm not, nor have I ever been, a COBOL programmer... I'm an old Pascal programmer with a strong opinion, trying to provide an answer.

The main feature of COBOL when it started was that it didn't require the programmer to write in machine code. Since then, like any programming language, various implementations were better optimized for the programmers than others. If you have a large COBOL program, it likely is very old, and contains decades of knowledge, and any effort to port it to another language will involve the painful process of rediscovering all those decades worth of assumptions and conclusions.

As for features, it was good at processing RECORD based information. with nested structures in those records.

I’d say ABAP and T-SQL are quite similar.
(comment deleted)
To be a good replacement, it has to work in as many of the same environments with their constraints. It needs to have the same kinds of number types (e.g. BCD with fixed decimals) It needs to be able to call into machine language routines/libraries.

I think the best language to replace COBOL is COBOL. The newer versions are nothing like the original ones. I've written Windows and OS/2 GUI programs using the Win16/32 and OS/2 PM APIs from COBOL in the 90s and I'm sure there's been more progress in the language since.

If I were to design a language to fill this role, it would be roughly like Python with static types and compiled to a binary. And opensource backed/developed by a major enterprise software provider, MS, IBM, etc.
COBOL was well-suited to poorly-paid programmers. In IBM shops -- and inside IBM -- programming was viewed as a clerical occupation and was compensated accordingly.
How usable is Java's support for decimal arithmetic?

IIRC IBM processor architectures like Power have decent BCD support as well.