PARSE: last few changes are too disruptive
The OS X version of R3 A89 would not boot. On closer inspection, there was an infinite loop in the CLEAN-PATH function that is called during the boot.
The problem was this line within the PARSE rules for CLEAN-PATH:
| copy f [to #"/" | to end]
If it had not been so fresh on my mind, I'm not so sure I would have noticed the problem. In that line the TO END is always TRUE. That creates two different behaviors from before:
- The SOME block which holds this rule is now an infinite loop.
- The COPY f always creates a string (it's never NONE).
It took me a minute to figure out the fix. It was to add:
at the top of the SOME loop. Kind of ugly really.
This situation got me rethinking the definitions of ANY and SOME, especially in light of changes over the last few days.
The ANY and SOME keywords are provided as shortcuts for ease of use. They are for us normal coders who want "smart defaults".
It was a mistake to change ANY and SOME to ignore the state of the input series... instead, we should have left those alone, and added a new keyword for users who want a loop that is independent of the input series.
Now, we need a good name for it. ALWAYS, LOOP, FOREVER, suggestion?