104
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 19 May 2024
104 points (97.3% liked)
Programming
17314 readers
76 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
For such an influential letter, I don't find his arguement all that compelling. I agree that not using
go to
will often lead to better structured (and more maintainable) programs, but I don't find his metric of "indexable process progress" to satisfyingly explain why that is.Perhaps it's because at that time people would be running the programs in their heads before submitting them for processing, so they tended to use more of a computer scientist mindset - whereas now we're more likely to use test cases to convince ourselves that code is correct.
I think it's convoluted way to describe it. Very technically-practical. I agree it's probably because of historical context.
The argument I read out of it is that using
goto
breaks you being able to read and follow the code logic/run-logic. Which I agree with.Functions are similar jumps, but with the inclusion of a call stack, you can traverse and follow them.
I think we could add a goto stack / include goto jumps in the call stack though? It's not named though, so the stack is an index you only understand when you look at the code lines and match goto targets.
I disagree with unit tests replacing readability. Being able to read and follow code is central to maintainability, to readability and debug-ability. Those are still central to development and maintenance even if you make use of unit tests.
I wasn't saying that unit tests replaces readability, I was saying that back in the 60s they'd reason and debug using their brains (and maybe pen and paper), with more use of things like formal proofs for correctness. Now that we write more complicated programs in more powerful environments, it's rare to do this (we'd use breakpoints, unit tests, fuzzing, etc).