Group: comp.lang.forth · Group Profile
Author: Bruce McFarlingBruce McFarling Date: May 2, 2007 15:41
On May 2, 2:48 am, Jonah Thomas cavtel.net> wrote:
> OK. I occasionally run into situations that seem to demand complex
> control flow structures.
If you have something that demands a complex control flow structure,
then it is even more essential then ever to be able to test the
control flow.
Say they are SNARE PITCH instead of CATCH THROW
Here, you are de-localizing the control flow. One part is in this
word, which does a PITCH, and the other part is over there in the word
that called a word that called a word that contained that word, which
does the SNARE.
This can easily, in other words, be worse than a GOTO, because it is
delocalized with the destination entirely context dependent.
And you have really snarled up the process of bench testing the
complex control flow structure.
Mikael Nordman's "test until success" table is the opposite. No matter
how much complexity is embedded in that table, its all there in that
one place, and once the table has been compiled, its straightforward
to test it every which way but loose. If the testes are nested in
arbitrary ways, then some successes lead to a different test until
success table, matching the nesting of the decision problem itself.
|