
Brush up your COBOL: Why is a 60 year old language suddenly in demand? - wyclif
https://stackoverflow.blog/2020/04/20/brush-up-your-cobol-why-is-a-60-year-old-language-suddenly-in-demand/
======
tzmudzin
For anyone criticizing COBOL for inducing alleged brain damage: yes, it is an
old language, but it's a domain-specific language.

The use case was processing of record-based inputs in an administrative
context, based on a technology millions of times less powerful than current
hardware, yet still able to sustain a massive administration (old-school
banking, anyone?)

No, you will not write a compiler or a kernel module in COBOL, just like you
won't write it in SQL, APL or Matlab. But for the purpose it was built for,
you'll be a lot more comfortable than in most alternatives.

~~~
stickfigure
> you'll be a lot more comfortable than in most alternatives.

That certainly wasn't on display here. The equivalent Java program (to use
everyone's favorite punching bag) would be a tenth the length.

The value of SQL is easily demonstrated in a blog entry of less than 500
words. Now that I've had this introduction, I can't imagine ever thinking "oh
this would be a great place to use COBOL!"

Fantastic and educational article, however.

~~~
tzmudzin
> The equivalent Java program (to use everyone's favorite punching bag) would
> be a tenth the length.

Not if you started dealing with real-life record format specifications,
including fixed-precision numbers for currency, dates etc.

~~~
stickfigure
Yes, really. Every one of the dozen languages I've worked in professionally
has support for fixed precision numbers. Processing structured records of data
is a thoroughly solved problem.

~~~
tzmudzin
We can debate and dispute this, but I'd rather propose: take a closer look at
how this is handled in COBOL, and you'll re-evaluate.

In shortest words: variable declaration is also used as I/O format
specification. Pretty much all of IO is just reading into a buffer, and the
values are automatically mapped for your use. Sure you can use the same method
in pretty much every general-purpose language (mapping C structs etc), but
here it comes just natural.

~~~
stickfigure
How about an example? Present a short COBOL program that is actually more
concise than a (say) Java program? The example presented in this blog article
seems a likely candidate, and yet would be _much_ shorter in modern languages.

If you want to make the case that COBOL is still a good DSL for its niche
(report generation?), it seems like there should be some straightforward
examples. This is super easy to do with the aforementioned SQL or Matlab.

~~~
tzmudzin
Wrong measure. COBOL is verbose (and I hate this), but the fit-for-purpose
should not be measured in LOC. It's how natural it is to perform the work, and
how easy it's for your successor to maintain your program.

------
pensatoio
I’m not sure if I should feel bad about it, but I have no sympathy for any
institution still using this dead language.

Our field evolves quickly. Cast aspersions on the issues of our field today
all you want - fragmentation and trend-chasing are big problems, but the
argument, “well it was built to last, and look, it’s still running,” doesn’t
excuse the horrible waste that comes from trying to maintain this ancient
stack instead of taking a level-headed approach and investing appropriately in
modern, stable technologies.

------
bobbydreamer
Brushing up COBOL skills. Once there were lots of projects which lots of IT
companies took, to migrate from COBOL to JAVA, some were successful and some
went back. COBOL is verbose, feels like writing English essay. Programs are
huge todo, Java can reduce 25%-50% of code sometimes, python can reduce
90%(pythonic). What stands out, newer versions of COBOL will be upgraded and
that old code will still work. New version is COBOL 6 :
[https://www.ibm.com/support/pages/cobol-v61-was-announced-
wh...](https://www.ibm.com/support/pages/cobol-v61-was-announced-whats-new)

I won't be surprised as IBM has bought redhat, now you can execute python
programs in mainframe. Why not do all that machine learning ans be close to
data instead of migrating to Hadoop.

------
edoceo
Amazing these "dead" languages I first sorta-learned in the 80 - before being
guided to Basic and C (and Foxpro). It's similar now to how folks need me to
maintain their "ancient" Perl or PHP apps they just cannot find time to
rebuild.

~~~
idiocrat
A parable I recall sometimes.

In Europe the grandfather has worked all his life to build a house, which will
last for generations. The father has worked all his life to buy a car, which
will last for generations. And the son is working with the aim to buy a yacht.

But in Japan each generation is working all life to re-build a house, which
lasts only one generation.

------
solidsnack9000
There wasn't much coverage on how to make big bucks with COBOL :/

