Object Oriented Rules

R++ extends the C++ language with a single new programming construct -- the rule. In addition to data-members and member functions, R++ adds a new kind of member to C++ classes namely "member rules". A rule is a statement composed of a condition and an action that specifies what to do when the condition becomes true. Whenever some program data changes, rules whose conditions involve that data are examined, and if a rule's condition evaluates to true, its action is executed. The action may of course modify data and therefore trigger other rules. Currently R++ is implemented as a pre-processor. It translates R++ rules into C++ code.