Fri Jan 22 22:07:18 EST 2016

Why Forth?

Another one in the series.

Forth gives up local namespaces.  In ordinary programming, there are
two namepaces that are particularly part of contemporary programming

  - Lexically scoped variables.

  - records / dictionaries / algebraic types.

Arguably, both are very related.  E.g. think of pattern matching.

Names give random access.  This in itself is very powerful.  Compared
to point-free notation, the advantage to this encoding scheme comes up
when the algorithm relies on this random access in an essential way.
E.g. if the data flow graph is very "tangled".

If the data flow graph can be "flattened", there is usually a
(factored) encoding that is much more compact than.

The "Forth Thesis" is then that in most cases, such a factoring exist.
This is very much dependent on finding a good representation.

In other words, the reliance on "tangled" graphs is a property of the
solution, not of the problem.

Forth will "win" when factorization can be pushed into the "Moore
scale", which consists of definitions of about 5-7 words.