Preferences

One of the reasons that BASIC was such an effective beginners' language was that it often appeared at bootup, so all you needed to do was turn on your machine and type a couple of lines to run a program.

This isn't that, but withering comments from Dijkstra aside, BASIC is still a great introduction to programming, and this is a fantastic idea; it'll be great to run loads of old type-ins in the browser.

Could have done with a crisper font, though.


I have to both agree and disagree here.

I love the idea of a language that has the absolute fewest number of decisions between "I need a little program" and being able to share the program with a friend. The current trend where there's a seemingly bazillion steps before you can write a trivial utility is unfortunate.

However, the microcomputer BASICs had big usability problems. Us modern programmers are so used to block oriented languages that we assume every language just had them. For example, in C you can replace any statement with a list of statements enclosed in { }. In Python where blocks are indented statements, or Pascal where you can make a block of statements with a BEGIN/END.

But many microcomputer BASICs don't have that at all. The IFs often don't have the concept of an ELSE, and often the only thing you can do from an IF is a GOTO.

The end result is a mess of jumps where the programmer is "emulating" real blocks with GOTOs. I've had the recent fun of transcribing programs from a bunch of different early BASIC languages. The complaint that BASIC leads to spaghetti code is real. There are bazillions of GOTOs, and it's a real drain on your mental processing to keep them all straight.

Sure, but BASIC doesn't need to be the 8 bit versions or GW.

Something like Turbo Basic or QBasic, with a REPL as well would do quite nicely.

On the other hand maybe what is missing is making those little boards with JavaScript or Python more widespread.

Why is BASIC a great introduction to programming? Genuinely curious. It's a bad language by pretty much all computer science standards. It only has global variables. In the past it used line numbers not labels. Many Basics only allowed 2 letter variable names. It has almost no library. (I suppose those could be added but they're already available in other languages). AFAIK there is little to no tooling for BASIC (meaning no auto0completion or popup docs that many languages have now)

I grew up on basic on TRS-80/Apple II/Atari 800 and I have super fond memories of those times. You can even find lots of my BASIC code in old magazines from the 80s. But, I don't really believe those were better than today with kids with Scratch or Unity or other alternatives. Python or JavaScript (runs everywhere) etc... Maybe even PICO-8/Lua etc...

Are there some concrete reason BASIC is actually a good place to start?

I wouldn't advise unstructured BASIC, there are plenty of structured improvements to choose from.

It is easy to learn because it was the first language to come with batteries.

In some 8 bit micros it was as powerful as the underlying Assembly, only slower. So it was relatively easy to prototype.

Also the the runtime was the OS.

Nowadays a kid needs to learn how to access the development environment, probably configured by an adult and to do more complicated tasks might need some help getting libraries.

Maybe stuff like boards with MicroPython will help here.

It's completely nostalgia. BASIC doesn't have any redeeming features except being in the right place at the right time.
I think the font quality is due to pixel density. It looks upscaled.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal