Software Engineering discussion
Masterminds of Programming
>
Forth
date
newest »


The interview made Forth seem like a flexible language. The language flexibility seems extremely powerful. I wrote software for a long time before I started seeing analogies to a human language or writing literature.
The claim that "Operating Systems are totally unnecessary" is bold.
Your point about difficulty of reading is one of the main criticisms against Domain-Specific Languages (which is what you get when you build up the language from minimal pieces). They can be hard to read for someone unfamiliar with the high-level functions you create, and code is read much more than it is written. So, there is a tension between minimal languages (which are easy to learn yet people add functions and macros to making them harder to read) and maximal languages (which are harder to learn yet (maybe) require fewer insider functions).
It was interesting to read the author's views that operating systems are unnecessary. It did cause me to reflect on how much resource in a computer is devoted to the application, and how much is devoted to the application environment.
I am starting to see a trend... all the language authors, so far, claim that their language is multicore/parallel/concurrency ready!
Here is a little RC4 cipher code sample (without the initialization) from the Wikipedia Forth article:
: ARCFOUR ( c -- x )
ii 1+ DUP TO ii 255 AND ( -- i )
S[:] + DUP C@ ( -- 'S[i:] S[i:] )
DUP jj + 255 AND DUP TO jj ( -- 'S[i:] S[i:] j )
S[:] + DUP C@ >R ( -- 'S[i:] S[i:] 'S[j:] )
OVER SWAP C! ( -- 'S[i:] S[i:] )
R@ ROT C! ( -- S[i:] )
R> + ( -- S[i:]+S[j:] )
255 AND S[:] + C@ ( -- c x )
XOR ;