News for hackers. Stuff that matters.
Re:Goto by peterhull90 on Tuesday April 16, 2024 @06:11AM (#40050255)
In my youth I had a ZX spectrum which had BASIC with line numbers and no renumber command. Sometimes when adding code I'd simply run out of line numbers so had to GO TO an unused block of line numbers, put the new code there and GO TO just after the original code. I've never quite recovered from that.
Re:Goto by mmaniac on Tuesday April 16, 2024 @07:57AM (#40050891)
Reminds me of ROM hacking. Overwriting an instruction inside a function with a branch to unused memory and jumping back later is an easy way to get extra space for the patch you want to write.
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.
Re:Goto by sdwr on Tuesday April 16, 2024 @09:56AM (#40051914)
Reminds me of those logic games that operate in (virtual) physical space

https://store.steampowered.com/app/300570/Infinifactory/

The feeling being squished into a corner by your own rat's nest is really something.