Re:Ask HN: Has anyone here learned COBOL for fun? How did it...
by pixl97 on Tuesday September 12, 2023 @09:11AM
(#37480626)
Ya, transactional processing of what I would consider simple and well defined data it's what typically occurs with cobol at financial institutions. In this context the code has been around forever and all the 'Oops we lost your money' bugs have generally been purged from it'.
Re:Ask HN: Has anyone here learned COBOL for fun? How did it...
by whartung on Tuesday September 12, 2023 @12:09PM
(#37483433)
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.
Re:Ask HN: Has anyone here learned COBOL for fun? How did it...
by deaddodo on Tuesday September 12, 2023 @12:27PM
(#37483712)
It lacks a whole slew of things you would expect in a GP language, or requires you to jump through massive hoops to achieve the same results.
Imagine trying to program a desktop application in SQL. You could probably achieve it through some use of triggers and interfaces, but it would be a nightmare. It's not quite as bad for COBOL, but a similar story.
Re:Ask HN: Has anyone here learned COBOL for fun? How did it...
by sreeramvenkat on Thursday September 14, 2023 @03:29AM
(#37506032)
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.
Mess around with it if you want, sure. Just realize it's a limited language with specific use cases and you're unlikely to ever touch it outside of those, even as a hobby/"for fun".