3 ms·
It's not a falsehood. It allows for a lot of bad stuff. Like the following function Thing1() begin do important things if condition g
by bena 3y ago
It's not a falsehood. It allows for a lot of bad stuff. Like the following
function Thing1()
begin
do important things
if condition
goto thisIsBad
end if
do more important things
end
function Thing2()
begin
do different things
label: thisIsBad
perform actions
end
And people would do the equivalent of that. You'd run across uninitialized variables, variables accessed outside of scope. Yes, there are disciplined ways to use GOTOs. And most control flow can be implemented with conditionals and jumps, but most people are not disciplined.
- ikari_pl 3y ago> most people are not disciplined Abstracting from programming languages alone, this is the reason why good software design makes doing the wrong thing either impossible, or at least very hard, while making the right use very easy. I am still learning to do that better. Sometimes I am able to foresee the misuse of a feature and make it impossible, but not always - and it's harder to correct the error once it proliferates. However, the article puts the quote (though it had nothing to do with GOTO) in context - and at the time no dialect of BASIC that was used by millions of users had support for functions (other than mathematical expressions declared with DEF FN), or procedures - so you couldn't jump out of scope... because there was only one scope.