upvote
> And I never, never, NEVER want to write another line of BASIC code again in my life.

Awww. I downloaded the ECMA-55 standard from 1978 about a year ago and wrote an interpreter in C to be compliant with its "Minimal BASIC". I then had fun typing in code from old computer magazines. So much nostalgic fun.

reply
I haven't written BASIC since I was a teenager! The more "modern" basics, without line numbers, were a definite improvement. I went from AppleSoft to AmigaBasic and QuickBasic.
reply
I had a little crisis at 12 when I went from BASIC to Pascal: how was that supposed to work without line numbers? The statements were just floating around without structure!
reply
I spent two years on hn just to read this comment. So true!

After all these decades, I finally learned that I wasn't the only one who struggled with line numbers from BASIC to Pascal. Thanks, buddy!

reply
Even with line numbers it's a hell of a lot easier once you get out of the 24 line X 80 character console window and into an editor you can scroll without needing the LIST command.
reply
I only use BASIC with line numbers, mostly GW-BASIC and pcbasic. Without numbers it just feels like Lua or python or any other scripting language, but worse? The line numbers BASICs come with their own almost-REPL (IDE?) that I find quite nice (or at least fun) to work in. Maybe mostly nostalgia, but it is the only reason for me to use BASIC at all. I have some basic-mode installed to edit BASIC code in emacs, but I only rarely edit the code outside of its natural built-in line-editor.
reply
> The more "modern" basics, without line numbers, were a definite improvement.

Never used them, and yet I can unquestioningly agree. The way you had to number each line in increments of 10 so that you could insert a line 15 later in between lines 10 and 20 was, looking back at it, insane.

I can understand why they did it. In the era of no full-screen text editors, where you just typed each line one at a time into a REPL (not that I knew the term REPL at the time), and it stored the lines in the order of their lines numbers... well, that was the only way to edit your code. Made a mistake on line 20? Type a brand-new line 20 and it will replace the old line 20. Want to insert a line between lines 10 and 20? Type in line 15 and it will go and insert. So you could actually load your program, edit your code at the REPL, and save it.

But man, using an actual visual editor is so, so, SO much better than that system. I'm glad it's on the dust heap of programming history where it belongs. It was a decent option for the time when computers had 4K of RAM, but once it was actually possible to edit code in a full-screen editor, line numbers were no longer useful.

reply
A lot of 8 bit basics had a RENUM which would even out the line numbers and repoint all the GOTO statements.
reply
The line numbers were also used for GOTO and GOSUB (although later on languages supported strings instead of numbers).
reply
Yeah, forgot to mention that, but that's entirely correct. Modern BASIC variants (I assume) let you label lines so that GOTO and GOSUB can still be used. But with a few flow-control constructs (I don't know modern Basic but in the linked repo I saw a couple `while ... wend` blocks) the need for GOTO is much reduced, I'm sure. GOSUB, well, again I haven't checked. But if GOSUB is allowed to point to a string label rather than a line number then it just becomes a function call, and is still a useful construct. (GOTO only has utility in being able to do the equivalent of `break` or `continue` inside a loop).
reply
Laughing agreement. I’m very sentimental for BASIC.

By the standard of getting kids started it’s an amazing and wildly successful language.

By any other standard, it is absolutely terrible! It commits every famous programming sin! Stay away! Do not learn from this language! LOL

reply
Classic Basic (line numbers, GOTO) resembles 1960s/1970s FORTRAN before it adopted structured programming. The idea when BASIC was invented in Dartmouth in the 1960s that it would be a good introduction to programming for students who might have to learn FORTRAN. The thing is, when BASIC was at its most popular (1980s home computers) FORTRAN itself had moved on from "spaghetti code".
reply

    10 PRINT "THIS IS FINE"
    20 GOTO 10
reply
I heard Basic is pretty good as far as embedded script interpreter
reply
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." -- Edsger Dijkstra
reply
even smart people say dumb things sometimes.
reply
like "goto considered harmful" when all assembly language depends on it
reply
In context though, it was trying to move standards forward.

Look at how acceptable C has changed over the years.

In ye old days it was acceptable to just read in any old text without checking bounds, now that is considered harmful.

There are still use cases for hairier parts of C, but that doesn't mean they should be used all the time. Same with goto.

reply