←back to thread

225 points JoeDaDude | 2 comments | | HN request time: 0.422s | source
Show context
tombert ◴[] No.42207795[source]
Forth has been something I've wanted to learn for years now. It seems weird to me that for most stuff in old computers, you have the option of "assembly" if you want your program to be fast, and "BASIC" if you want your program to be slow, but Forth lingers along as the "medium speed" language, despite at least looking pretty high-level.
replies(7): >>42207863 #>>42207931 #>>42208026 #>>42209557 #>>42210559 #>>42213720 #>>42213966 #
abecedarius ◴[] No.42210559[source]
One of the great things about it was, it came with an assembler vocabulary to code your inner loops or other lowest-level stuff in. I gather BBC Basic had something like that, but I never saw and and I did get to use Forth in this way back in the day. Most of those systems made it harder to flexibly mix the higher and lower-level coding.
replies(1): >>42213387 #
1. veltas ◴[] No.42213387[source]
This is much like C. The easiest way to use assembly in C or Forth is to know your 'ABI' and write separate assembly code functions where needed. In Forth at least you can write a CODE word.
replies(1): >>42214902 #
2. abecedarius ◴[] No.42214902[source]
Yes, though:

- high-level Forth also amounts to a Turing-complete macro assembler (much better than textual macros)

- C was less practical/available on early personal computers, especially for coding right on the target system. When I was doing this it was on a TI 99/4A in the early 80s.