In this letter, Dijkstra talks about readability and maintainability in a time where those topics were rarely talked about (1968). This letter was one of the main causes why modern programmers don’t have to trouble themselves with goto statements. Older languages like Java and C# still have a (discouraged) goto statement, because they (mindlessly) copied it from C, which (mindlessly) copied it from Assembly, but more modern languages like Swift and Kotlin don’t even have a goto statement anymore.
Java does not support goto.
Well it has labeled breaks but that’s the closest it gets to it.
This is true. It’s also a very far way from “Java still [has] a … goto statement, because they (mindlessly) copied it from C”.
And yet it’s still easy to write spaghetti code in Java. Just abuse inheritance. Where is this function implemented? No one knows but the compiler!
You mean
SpaghettiFactory()
And don’t forget to use miracle sort for any sorting needs you have. Why do the work yourself when you can just hope it gets solved for you?!
You can write bad code in any language you like.
That doesn’t make it spaghetti code though. In well-written OOP code you shouldn’t care where a function is implemented. The problem is a much too high level of abstraction. If your high level code is so abstract that it is only running tasks and handling messages there’s no way to write it in a way that prevents mistakes because you couldn’t possibly know what the actual implementations do.