News for hackers. Stuff that matters.
Re:Goto by bregma on Tuesday April 16, 2024 @06:43AM (#40050454)
My first job out of university was maintaining a FORTRAN IV program on a PDP-11. The only control structures in that language was IF..GOTO and the arithmetic GOTO. You can still write readable half-decent code with that, with discipline. A DO loop is still superior for readability.

The horrors of BASIC with its spaghetti of GO TO or its mess of PEEKs and POKEs are a justification for permabanning that style of programming -- but a decade of typing in listings from magazines inspired the generation the brought us the web and pocket phones. Maybe it wasn't such a bad thing after all.

Re:Goto by pklausler on Tuesday April 16, 2024 @10:22AM (#40052290)
You had a FORTRAN compiler that didn't have DO loops? I'm dubious.
Re:Goto by shawn_w on Tuesday April 16, 2024 @07:24PM (#40058593)
FORTRAN IV (1962) predates DO, which if Wikipedia is to be trusted, was introduced in FORTRAN 66.
Re:Goto by pklausler on Monday April 22, 2024 @06:30PM (#40123072)
FORTRAN (no numbers!) had DO loops in the first release of the language. No subroutines, only statement functions, but there absolutely were DO loops! The ability of the compiler to perform what are now basic loop optimizations on them is what sold the users on automatic compilers.