Hacker News new | ask | show | jobs
by toolslive 60 days ago
> This is what most programmers do. They type raw text into the editor; the compiler either processes it into structured data, or returns an error the programmer has to internalise before resubmitting.

In the 1980s structural editors were quite popular (fe the basic editor in the ZX81). Using these, it is impossible for the programmer to create text that is not a valid program.

1 comments

I never saw any structured editor on these machines, how did they operate ? grammar guided insertion ?
Not a technical answer but when we started up the system (zx 16k) we were in a prompt. We would add commands with line numbers. After each line number the list of possible commands were embossed on the keyboard and you would start with that (if, peek, poke, etc). What you could complete was limited by that. Edit: BASIC programming

That was not a very good description so try this: https://www.usebox.net/jjm/notes/basic/ (scroll down for keyboard pic and also some code). Or this video : https://youtu.be/zgjGsNS6a0Y?t=167

I see. So if IIUC, it's similar to programmable pocket calculators too, and it's very enjoyable to have a physical key per language construct.
Right. That's the gist of the 'curated/guided' command entry.
That's interesting, I hadn't heard of this. I guess IDEs kind of took some elements from that but with more flexibility.
ha! I found an online simulator. Just try to do a

    10 print "hello world!"
to get a feel for it.

https://www.zx81stuff.org.uk/zx81/jtyone.html

A bit confusing but extremely enjoyable, thanks