next up previous contents
Next: Implementing algebraic logic in Up: The syntax of the Previous: Compound Terms

Aside on Precedence and Grouping

The default precedence and grouping convention of Watson, reflected in the previous subsection, is that of the old computer language APL: all operators have the same precedence, and all group to the right. This convention is at odds with standard mathematical usage, but not at all hard to learn.

Watson supports user-defined precedence and grouping: precedences are natural numbers, with all operators assigned even precedence grouping to the right and all operators assigned odd precedence grouping to the left. The default precedence of operators not assigned a specific precedence also may be reset from 0 to any desired value (this may also affect the default grouping, of course).

Historically, we do not believe that any user other than the designer has actually made use of the user-defined precedence features of Mark2 or Watson in extended work. Users seem to adapt well to the default ``APL'' conventions. We believe that user-defined precedence is likely to be important in any future educational applications of Watson, where familiarity of notation will be at a premium; there also might be application areas where modifications in precedence will prove to be of practical importance.


next up previous contents
Next: Implementing algebraic logic in Up: The syntax of the Previous: Compound Terms
Randall Holmes
2000-11-03