I made a minimalistic Xojo reference for beginners

Back in the day, we used goto primarily to create loop structures. Porting that code to Xojo was pretty straightforward. For and While look so much nicer than that old code. It’s a good thing we were so rigid about the use of goto.

Even farther back in the day, we were doing the same thing in assembler. The driving principle was to keep everything in small chunks of code that can stand alone logically. It wasn’t a philosophical thing, it was self preservation. Small, discrete pieces of code are just easier to maintain.

‘goto’ is completely unnecessary, and as I said above, I’ve not used it since 1978. OK I lie. In 1982 or so I had to use a Pascal under RSX-11M which didn’t include a ‘return’. Since I think that SESE is the height of foolishness, I simulated that by putting a label 999 on at the end of any method where I wanted early return, and used goto to reach it. But otherwise - dustbin of history.

This was a deliberately provocative question. Wherever someone says “goto”, there are at least three who say “don’t use goto”.
These “don’t use goto” ist absolute redundant, not to say nonsense, because almost no one uses it. Much more serious problems than “goto” can cause are circular references, threads (deadlocks, race conditions), “addhandler” and “addressof”. Programming can cause problems in general. So, would you say, programming is nothing for beginners?

To say that is completely unnecessary. OK, I’ll stop here :wink: