"Spaghetti code is not the fault of GOSUB/RETURN or GOTO, it's simply insufficient knowledge how to do it right."
I can tell you, spaghetti code was almost guaranteed with C=64 or GW-BASIC code. You ran out of line numbers in one part, then used GOTO because renumbering 200 lines of code (and all references to those lines of code) is no fun at all. The more complex the program got, the worse the spaghetti code became. I started mapping out the line numbers in the thousands for the various parts of my programs, just so I never had to renumber anything. It did look silly on small programs, mind you, lol.
The early BASIC spaghetti code was directly the fault of the BASIC editor (or lack thereof). Since Q-BASIC, there has been no excuse for using GOTO or other code kludges. It's been all IDEs since then, probably because of how ubiquitous QBASIC became for new programmers looking to try programming. Even QuickBASIC v4.5 was nowhere near as advanced as say Turbo Pascal (and nowhere near as fast), but for "included with the operating system" it was truly amazing! Light years beyond C=64 or GW-BASIC. I think I've only spent a few hours programming in BASICs that require line numbers since that first time I loaded Q-BASIC.
Personally, I find more modern IDEs to be mostly garbage. QuickBASIC v4.5 was my dream programming environment as a kid, built-in help allowed me to learn [almost] the whole language without opening a book. I find a lot of modern programming IDEs have too much clutter and garbage that gets in the way of actually focusing on programming, and can have performance issues on larger projects. I loved DOS 16-colour text mode GUIs, like PC-Tools and the Norton suite. Very efficient, everything can be done with a couple key clicks. Modern GUIs often require you to use the mouse, or jump through hoops with the keyboard -- why should I have to press 7 keys to do a basic function? I feel mouse-oriented apps often forget about user efficiency altogether -- that is, actually getting the task done in the shortest period of time.
I have been enjoying getting back into programming these past months, in a modern programming language that also respects the old-school Q-BASIC/QuickBASIC efficient IDE style. It also seems to compile quickly. ~2,700 lines of code in ~3 seconds... not sure how it would perform with 50,000 lines of code. Back in the day, QuickBASIC v4.5 took about that long to launch your app on a 286 when you hit F5, and significantly longer if you wanted to produce a standalone .EXE file.
In the modern era, spaghetti code usually refers to programmers that don't know how to program themselves, but are okay at reading other people's code. They do their programming jobs by doing web searches for everything they're trying to accomplish, then gluing the pieces they find together until they mostly work. Nobody will be able to tell at first glance what this code does, as there is zero structure present. But the original spaghetti code was definitely GOTO. What an ugly nightmare it was with forced line numbers and GOTO. There were literally magazines with terrible BASIC code, sometimes having a dozen GOTO statements. I think a few of the programmers reveled in writing ugly obfuscated code, making their programs seem more ineffably impressive to the general public.
Q-BASIC might be one of the greatest contributions to computing by Microsoft ever. Did they actually produce the IDE themselves? Or just buy up a preexisting software package. I've never looked into the history of the IDE itself, I was just an enthusiastic user at the time. Pretty sure QuickBASIC v4.5 was my favourite app on my 286, although I also loved speed-running Wolfenstein 3D using a mouse + keyboard (everyone else had Doom on their 486s, I had Wolf3D on a 286).