News for hackers. Stuff that matters.
Re:It’s COBOL all the way down by nafey on Tuesday May 01, 2018 @02:47AM (#16965024)
Although I am not familiar with COBOL I am assuming this means you have to indicate where the control returns to after a function ends
Re:It’s COBOL all the way down by jrq on Tuesday May 01, 2018 @05:53AM (#16965698)
So that's kind of like a coroutine. Taking recursion away seems like an unnecessary limitation, considering how much power main frames have. Resource efficiency is great and all, and certainly there's a benefit to not hammering the stack as often, but that takes away an entire category of definitions you can't express, right?

Maybe someone who writes cobol could chime in on this.

Re:It’s COBOL all the way down by kbp on Tuesday May 01, 2018 @11:21AM (#16967769)
> Taking recursion away seems like an unnecessary limitation

Modern Cobol doesn't seem to have this limitation, eg http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handhel.... When Cobol originally appeared, call stacks weren't standard, Lisp didn't exist yet, and neither Fortran nor Algol supported recursive functions; it made sense at the time.

Re:It’s COBOL all the way down by jrq on Tuesday May 01, 2018 @12:18PM (#16968428)
Ohhhhhh, of course!

Gosh, thanks. I sometimes hold historical technology to unfair standards because I'm not thinking about the continuity of it all.

Crazy to think twenty-somethings are out there hacking COBOL!

Re:It’s COBOL all the way down by Koshkin on Tuesday May 01, 2018 @09:25AM (#16966824)
> how much power

Do not forget that when COBOL was created mainframes were less powerful than today's microcontrollers.

Re:It’s COBOL all the way down by blattimwind on Tuesday May 01, 2018 @08:22AM (#16966390)
Recursive and iterative functions have the same computational power.
Re:It’s COBOL all the way down by adrianN on Tuesday May 01, 2018 @08:51AM (#16966570)
And every computable function can be expressed in Brainfuck. That doesn't mean that some algorithms are a lot more elegantly expressed when your language supports recursion.
Re:It’s COBOL all the way down by joshuaduffy on Tuesday May 01, 2018 @08:20AM (#16966375)
Correct. They are called subroutines in COBOL.