Hacker News new | past | comments | ask | show | jobs | submit login

Looking at the absurdly long code required to make factorials work makes you wonder what conveniences we are all used to without really appreciating them. And which ones will future programmers take for granted but are too niche now - maybe async/await or the borrow checker concepts, or is programming mostly "done"?

http://rosettacode.org/wiki/Factorial#COBOL

or also http://rosettacode.org/wiki/FizzBuzz#COBOL

Is there a code example where Cobol shines in comparison to, say, Python?




Oh no every time I visit Rosettacode I spend an hour looking up languages on Wikipedia.

Today’s winner is dc

> dc is the oldest surviving Unix language.

https://en.wikipedia.org/wiki/Dc_(computer_program)?oldforma...


I'm amazed, it is even included in the latest MacOS release


It’s like awk/sed, it has to be packaged with any unixy system.


> Is there a code example where Cobol shines in comparison to, say, Python?

Yes, processing (like tabulating) fixed-size records (like punch cards) with hierarchical structure. You can do that with Python's struct module but it might be more readable in COBOL.

Other than that somewhat domain specific task, no. Python has a lot more features and is a lot more general language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: