BASIC gets a lot of flack from people with a certain kind of snob factor (yes, you know who you are). And there is the infamous comment by Edsger Dijkstra, and BASIC has never lived it down. Nowadays when you see people discussing what is the best first language I probably see Python mentioned most. In these forum discussions someone always seems to snidely denounce BASIC as that old thing with the GOTO and the unreadable spaghetti code. They don't seem to have a good reason to recommend Python, except that it isn't BASIC.
People also recommend C and it's derivatives such as C++ which also has GOTO. So go figure.
Wait, here is something scandalous! On the Python Software Foundation website, in their design and history FAQ page, they actually answer the question about why there is no GOTO in Python by encouraging people to use exception handling as a hack to simulate something like GOTO! Ummmm. See for yourself. https://docs.python.org/3/faq/design.html#why-is-there-no-goto
Okay, getting back to the starfield simulation example. If you look at the version of the starfield simulation written in Liberty BASIC, it addresses some of the things that BASIC is frowned on about.
- GOTO - Uh oh, not really. There is one GOTO, but in this case I'm not sure a WHILE/WEND forever loop is really better, so... The Commodore BASIC version has three GOTOs.
- Structure - The Liberty BASIC version uses control structures properly the way modern languages do.
- Line numbers - Liberty BASIC programs do not require numbers. You can give your routines meaningful names instead of numbers.
Okay, let's be frank. Liberty BASIC was not the first version of BASIC to solve these problems. There are many BASICs with modern features, and so it isn't fair to criticize BASIC as being a bad language for beginners. BASIC has been a proper language for teaching good programming practices for a very long time now.
What do you think? Comments welcome. :-)