4 ms·
No, it explains that any use of the original goto operator would break the formalization model. No current language has the goto model that Dijkstra was advocat
by jerf 7y ago
No, it explains that any use of the original goto operator would break the formalization model. No current language has the goto model that Dijkstra was advocating against; he won. To put it in modern terms, the goto in question would be exposing to the programmer the raw "jmp" assembly instruction. No high level language does that.
Indeed the best way to understand what they can and can not do is precisely to understand that formalization model and understand when you can't do a certain thing because it breaks it.
- AnimalMuppet 7y agoUm... can't C jump pretty much anywhere (at least within the same function)? Including insane things like into loops? Is that enough to break Dijkstra's model? (Or are you excluding C from "high level languages"?)
- jerf 7y agoWell, I'd certainly exclude C from modern high level language, but I am obviously forced to concede that's not what I said before. :) Instead, I'll have to confess ignorance; I didn't realize that C's goto was that insane but it seems it is. https://stackoverflow.com/questions/6021942/c-c-goto-into-the-for-loop https://stackoverflow.com/questions/6021942/c-c-goto-into-th... I'll have to ask the reader to suitably modify the post above. The tamed goto made available in most modern high level languages can't break the analysis, because the compiler will reject it, i.e. https://play.golang.org/p/2tA7Bpof611 https://play.golang.org/p/2tA7Bpof611 (hit "run" to (try to) compile)
- AnimalMuppet 7y agoMy compliments. That is perhaps the most gracious response I have ever seen to someone pointing out that your statement is (somewhat) in error.