4 ms·
I programmed in Forth some time ago and I wonder why didn't Wozniak implement Forth on his first computer. Surely, it would be easier to do and run faster than
by listic 13y ago
I programmed in Forth some time ago and I wonder why didn't Wozniak implement Forth on his first computer. Surely, it would be easier to do and run faster than BASIC. That BASIC was a naive interpreter, it couldn't help being slow, except for the primitives that Woz coded in machine language, I'm sure they were fast.
Was it already clear for Wozniak in 1975 that Forth looks weird and people won't get it?
- Jtsummers 13y agohttp://en.wikipedia.org/wiki/Forth_(programming_language) http://en.wikipedia.org/wiki/Forth_(programming_language) I checked the above link to confirm my recollection, but while Forth had been around for a while it wasn't really public until the 70s (versus BASIC). I suspect he wouldn't have even heard of it, or at least not realized its potential, in 1975.
- raverbashing 13y ago> Was it already clear for Wozniak in 1975 that Forth looks weird and people won't get it? Since he had an HP calculator, yes
- colomon 13y agoI'd simply guess he'd never heard of it -- it was pretty obscure in the early 1970s. It might have been less accessible to beginners, but Forth was the perfect language for those early microcomputers. I loved programming in it on my Commodore 64.
- zhemao 13y agoWozniak was all about bringing computers into wider use. At the time, BASIC was considered the "easy" language to learn. So easy that kids could do it.
- listic 12y agoI thought Logo was, too, and Logo is based on Forth, but I checked Wikipedia article and Forth is not mentioned. Also, don't know about the popularity of Logo back in the day, but I thought it enjoyed some.
- kalleboo 13y agoIt says right there in the article. BASIC had books like "101 computer games" published for it. It had already made Bill Gates a minor celebrity. It already had the most mindshare in his target market. > "The key to games was BASIC. Bill Gates was unknown except in the electronics hobby world. Everyone in our club knew that he'd written BASIC for the Intel microprocessor. I sniffed the wind and knew that the key to making my computer good (popular) was to include a high-level language and that it had to be BASIC. Engineers programming in FORTRAN were not going to be what would start a home computer revolution."
- etfb 13y agoI think it must have been. If he was aware of it at all, he would have associated it with the Reverse Polish Notation of his HP calculator, and probably knew that, while they were certainly powerful, RPN calcs were never going to make it to the mainstream. And actually implementing a basic interpreter isn't all that complex. The loop is simple: Read a line. If the line starts with an integer, you're adding a line to your program; otherwise you need to interpret then execute. Read the first word. In some BASICs, this is the first string of characters that matches one of the keywords; in others, it's all the alphanumerics up to a non-alphanumeric. (In effect) dispatch to the appropriate interpretation routine based on which keyword you just read in. For example, PRINT goes to the argument handler for PRINT, LET goes to the argument handler for LET, and so on. Then you just have a bunch of routines (read one variable name, read an expression and interpret it as a number, read a destination line number, etc) and different keywords use them in different ways. It's pretty simple, really. Way easier than writing a full LALR parser.