[Coco] C VS Basic Coco

Wayne Campbell asa.rand at gmail.com
Wed Feb 14 12:42:05 EST 2018

I agree, Bill. There are times when GOTO is useful, but even then I try to
finds an alternative before using it. The IF/THEN <line ref> in Basic09
uses what the header to Basic09 calls the invisible GOTO. The token is $55.
It is also used in other constructs as well, so there is use for GOTO even
behind the scenes.


On Wed, Feb 14, 2018 at 9:29 AM, William Astle <lost at l-w.ca> wrote:

> On 2018-02-14 10:06 AM, Bill Gunshannon wrote:
>> Ask Dykstra.  Or just look at the decades of research into why GOTOs are
>> bad.
>> In one of my last professional programming gigs I took more than a dozen
>> programs heavily laced with GOTOs (true spaghetti code!!) and using proper
>> structured programming removed all of them.  While I am not one who
>> heavily
>> favors standards bodies I think when they decided to come up with a BASIC
>> standard it should have deprecated the GOTO entirely.
> Unrestrained use of GOTO is definitely bad. Especially when you have
> better alternative control structures (FOR, WHILE, etc.) and proper
> blocking that hide underlying GOTO business.
> However, there are some cases where it can serve to make the code flow
> clearer.
> Note that I'm not advocating for the use of GOTO everywhere. I'm simply
> saying that getting rid of it entirely is a bit like throwing the baby out
> with the bath water. Is it strictly required? No. Is it useful sometimes?
> Yes.
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco


The Structure of I-Code


More information about the Coco mailing list