Tuesday, October 13, 2009

Going Forth

I came across a surprising book in the Needham Public Library when I was 15. It was called Starting Forth, and it was about a programming language called Forth.

The author Leo Brodie had written a charming and fun book about a very interesting language. Forth is a stack based language, and it has a postfix notation in its syntax. So instead of writing 3 + 4 you wrote 3 4 +. Seems strange, but to me it was very familiar because I got my start using HP calculators where you did exactly the same thing.

Forth is interactive, like BASIC. It has a very small core of functions called words, and you create an application by adding new words which have the same syntax as the ones that come built-in. Essentially you extend the language to solve your problem. Smalltalk is also like this.

Forth is the language used to program NASA's space shuttle, so it has some clout. I discovered that there are quite a few Forth fans out there, and I even managed to buy a Forth language cartridge for my VIC-20. Awesome.

No comments: