Live data from Hacker News

Ask HN: Has anyone here learned COBOL for fun?

news.ycombinator.com

81–82 of 82 posts

Re: Ask HN: Has anyone here learned COBOL for fun?

#82
post #6

I messed around with it, thinking it seemed interesting and could be useful to know Just-In-Case. One thing I didn't get, until I started messing with it, is that COBOL isn't a general purpose language. There's a whole category of things it just can't do, and if you ask about it you'll just be told "COBOL isn't C". There's another set of things it's really effective at, primarily transactions and large iterations. Me…

Curious what the limitations were. Anecdotally I was talking with a COBOL vendor way back in the mid-80s and he had mentioned that their COBOL compiler was itself written in COBOL. FORTRAN also suffered limitations back in the day, notably lack of dynamic memory, yet folks were able to write sophisticated systems in it as well.

IIRC it doesn't have a stack. So all variables are globals. There is no way to call a function with a parameter - to be accurate, there are only subroutines; no functions.
Post reply on HN