If you can look past the syntax, modern COBOL is a decent enough compiled language, with most of the stuff you'd expect.
(;-))
And I'm untroubled by syntax; I'd happily use C-like languages, ML languages, Lisps, etc. COBOL just isn't a good or interesting language nowadays, if it ever was.
It feels as if you were writing something like this:
Program Name The Program.
Author the_af
Data section.
Some numbers.
X 1.
Y 2.
Actual code section.
Program beginning.
About to start.
Let's do this.
Add X and Y, Giving Z, Z Being the Addition of X and Y, but not of W nor V. U is right out.
Having Computed Z, Z Being The Addition of X and Y, Z is therefore the Result.
Give Result.
Program End.
Ok, this is a parody, but it's also what writing COBOL feels like -- or at least, what it used to be like. And somebody thought because these were "English words", that this would somehow enable less technically minded programmers accomplish their tasks.But sometimes you just want to write:
f(x, y) = x + yProvided the target language supports "goto", and "fall through PERFORMs" :)
>If you can look past the syntax, modern COBOL is a decent enough compiled language, with most of the stuff you'd expect.
Probably < 1% of production Cobol uses any syntax newer than Cobol 85!
https://www.microfocus.com/en-us/products/visual-cobol/overv...
Latest revision is from 2014.
As an old-school (i.e. >25 yrs ago) COBOL programmer its pretty jaw dropping to see that the language has continued to evolve.
I just got done (towel thrown) after a 12 hour workday where 30 minutes were code change, build, unit test and the rest was trying to get the tester, who is COBOL age appropriate, to understand how our program works, how we use APIs to communicate with other systems and how to test it.
In the end the Jira errand got sent back to me because of an error in an unrelated program that we verified existed earlier today before my code was deployed, because it ‘has to be the API program’. =,)
They’ve also apparently been testing all other APIs by sending simulated OK responses with the expected data <3
And remote pandemic work in a team where everyone is 2x my age has gotten me into a p. deep depression.
YMMV. :-)
Enter stage left my first job as a developer in 2016 and I'm tasked with learning cobol to support customizations to their 25 year old Lawson Implementation.
I'll probably never use it again but reading and writing cobol code opened my eyes to different design patterns not often seen in more modern languages. Seeing clever implementations of features that come out of the box in modern languages was really neat.