Pit Falls

Stratego -- Strategies for Program Transformation
From time to time you write obvious code, but after several days of intensive debugging, you discover that it cannot possibly work. Beginners are espacially at risk for this, because they find it difficult to distinguish between code that fails because they made a mistake, or because they midunderstand the language semantics.

This page is a list of such PitFalls.

  • You code topdown(s) to apply the strategy s wherever possible. It ends up being applied nowhere. You see, topdown(s) fails as soon as its argument s fails. To get s applied everywhere it can be applied without getting stuck where cannot be, use topdown(try(s)) instead. The same holds for other iterators. -- HendrikBoom - 02 Jul 2001

  • Please add more war stories here; otherwise this page will itself be one of the PitFalls.

-- HendrikBoom - 02 Jul 2001

Stratego.PitFalls moved from Stratego.PittFalls on 15 May 2003 - 10:39 by MartinBravenboer - put it back