Live data from Hacker News

Don't hate COBOL until you've tried it

opensource.com

1–10 of 139 posts

Re: Don't hate COBOL until you've tried it

#2
Oh my God. I wasted a year of my life on a COBOL project. It is easily the worst language I have ever used. There is a reason that COBOL is a linguistic dead-end! Functions? Sensible limited variable scope? A decent approach to handling whitespace so that complex, nested branches make sense? COBOL doesn't even have these basics.

Want to declare a variable? You're gonna have to type weird stuff like this: `07 GreatVariableName PIC X(10).`

Oh yeah, and the compiler cost me $3k (great job, Micro Focus), on top of the Solaris machine I had to buy to run it. (This project happened to use `mmap()` via FFI, so it had to run on a Unix machine...)

Maybe I'm a bit bitter, but I will never touch another line of COBOL again.

Re: Don't hate COBOL until you've tried it

#4

Oh my God. I wasted a year of my life on a COBOL project. It is easily the worst language I have ever used. There is a reason that COBOL is a linguistic dead-end! Functions? Sensible limited variable scope? A decent approach to handling whitespace so that complex, nested branches make sense? COBOL doesn't even have these basics. Want to declare a variable? You're gonna have to type weird stuff like this: `07 GreatVar…

The last time I touched it was in undergrad. I remember a professor in my assembly class was showing us old punch cards. They were made with the fancier machines where it printed the line of code on the bottom of the card. I look at the lines in the stack and was like, "Wait, is this ... is this COBOL?"

I have to agree. Even back in 2001, I found COBOL awful. I recently moved to a new city after having worked Scala jobs for several years. All I can find here is Java work and I dread going back to the god awful word of Spring Boot+MVN+Java after having worked with a considerably better language (usually :-P).

We have better tools today, but the world is left in legacy. So few things have unit/automated tests and without a good crew of engineers, it's very difficult to move things quickly and smoothly to new systems and platforms. Just because COBOL is still in use in so many systems doesn't make it good. It just got popular at the right time, everyone embraced it, and now people who still do it are paid insane amounts of money just to maintain it.

Here's one of my old COBOL programs from University. It was written 15 years ago. I converted from CVS to Git, so the history dates are literally older than github, which is kinda funny:

https://github.com/sumdog/assignments/blob/master/csc3620-pr...

Re: Don't hate COBOL until you've tried it

#8

It's surprisingly well adapted to web development too http://www.coboloncogs.org/

If you have an existing COBOL app you can convert it to a web app and develop using a simpler syntax with more features through SystemZ from Zortec Intl. I've worked with them personally and they were super-duper.

COBOL isn't so bad when you use a modern variant that purposefully deals with many of the complaints surrounding it.

Re: Don't hate COBOL until you've tried it

#9
I think COBOL is not a question of hate vs not hate. To hate something you need to consider it, you need to have requirements. If nobody shares an article like this one nobody is actually THINKING about COBOL. If someone starts a new project COBOL is not on the list of possible programming languages to implement it in. If you want to make it more popular don't fight hate, fight ignorance.

But to be honest I'm one of these people who up till now doesn't even consider it a choice. So don't expect too much support or understanding from my side.

Re: Don't hate COBOL until you've tried it

#10

Oh my God. I wasted a year of my life on a COBOL project. It is easily the worst language I have ever used. There is a reason that COBOL is a linguistic dead-end! Functions? Sensible limited variable scope? A decent approach to handling whitespace so that complex, nested branches make sense? COBOL doesn't even have these basics. Want to declare a variable? You're gonna have to type weird stuff like this: `07 GreatVar…

IBM has been trying to fix this for decades. Either through UML/OO interfacing [not kidding], or 4GL language (a slightly more modern language with cobol use case in mind).

I don't despise COBOL, it's mostly a reporting mindset language. Fitted with record file systems you can do some stuff. But if you step outside .. god help you. And if you use X-to-COBOL compilers, then even god cannot help you. Pages and pages of mangled COBOL terms. People show you printouts like war scar tissue on your first day to assert senior status :D

Post reply on HN