[Info-vax] BASIC (and Horizon)
Dan Cross
cross at spitfire.i.gajendra.net
Thu Feb 1 08:00:47 EST 2024
In article <upf4q6$1tp4r$1 at dont-email.me>,
Dave Froble <davef at tsoft-inc.com> wrote:
>On 1/31/2024 8:26 PM, Dan Cross wrote:
>> In article <upejl0$1nkl5$1 at dont-email.me>,
>> Dave Froble <davef at tsoft-inc.com> wrote:
>>> I've seen code that did all kinds of confusing things, just avoid a GoTo branch.
>>> My question is, why? If the need is a simple and rather easy to understand
>>> branch, why get complex,
>>
>> `goto` by itself is a sharp tool; sometimes incredibly useful,
>> but dangerous if misused. Our industry is littered with example
>> after example of `goto` misused. For instance,
>> https://dwheeler.com/essays/apple-goto-fail.html
>
>Cars are dangerous, should we go back to horses?
I think the analogy is more like, "cars are dangerous, so should
we get rid of seatbelts?" Or, "Takata made dangerous air bags,
so what's the point of having them at all?"
>Horses are dangerous, should we go back to walking?
>Walking is dangerous ...
>
>Flying is dangerous ...
>Boats are dangerous ...
>
>Crossing the street is dangerous. But we're taught to look before stepping in
>front of the bus.
>
>GoTo can be dangerous ...
>Learn good programming habits ...
I wonder if you read the rest of my post which tried, perhaps
imperfectly, to say more or less the same thing.
>> That said, `goto` obviously _does_ have a place when used
>> judiciously.
>
>Yes, that ...
Just so.
- Dan C.
More information about the Info-vax
mailing list