Thu Dec 30 13:37:21 EST 2010
Instantiation and control flow
The idea in the Forth syntax is to give give full control to the
programmer regarding control flow. I.e. the default is for words to
This base-level control is an important feature: you want to be able
to build abstractions on top of control flow.
How to make this explicit? Probably we just need two code
instantiation forms: one that behaves as the macro form (with implicit
exit) and one that has fallthrough code.
These are currently set as:
(words (name . code) ...) ;; individual words
(words-flat (name . code) ...) ;; fallthrough words
The order is not specified in the individual words. This makes
fallthrough explicit and macro <-> word substitution simpler.
I don't see a simple way to write this on top of the `compositions'
macro as there are two namespaces involved.
So this seems to be it.
The same goes for variables. Question: should variables be flat (in
sequence) by default, or should we keep them re-arrangable? The usual
caveat applies: if flat, it's no longer managable, i.e. no fancy