4 ms·
You're getting downvotes from the people who don't know that you are 100% right: goto is usually with labels, not line number, for exactly the reason you point
by seisvelas 6y ago
You're getting downvotes from the people who don't know that you are 100% right: goto is usually with labels, not line number, for exactly the reason you point out.
This Gist is still super cool, though.
- pjc50 6y agoFurther back, BASIC lets you go to a line number .. but the line numbers are explicit and not required to be consecutive. In fact you'd routinely leave holes in the numbering in order to insert an extra line without breaking it. Better systems offered a "renumber" function. Others .. didn't.
- seisvelas 6y ago>BASIC lets you go to a line number QBasic let you use either a line number or a label, I believe they only kept line numbers after labels were introduced for backwards compatibility. I know I'm veering way off topic but for as much disdain as BASICs receive, I really do feel like coding up a simple game was much easier for teenage-me in QBasic than it was in Python with pygame, for whatever reason.
- pjc50 6y agoI think a lot of people have reported having that experience, and I think it's been deeply under-investigated by programming language researchers.
- jbay808 6y agoMy first programming experience was QBASIC. Even if it's not a good programming pattern, I think GOTO is a great way to let a novice programmer "discover" the idea of loops and functions for themselves. Although it's error prone, it's still very intuitive for someone with no programming background.
- sitkack 6y agoQBasic is actually a really awesome language, I am bummed I didn't embrace it like I should have. I ended up going C/C++ ... Perl ... Python. I wasted a lot of time with C/C++, if I had immersed myself in QBasic, I would have better actualized myself.