5.2.5. Why there is different syntax for properties and roles
Superficially, assignment does not look that different for roles and properties. So why not adhere to the same syntax for both? There are three reasons:
-
There are assignment operations that work on roles but not on properties: bind, bind_, unbind, unbind_ and move.
-
There are assignment operations that work on properties but not on roles: = (set) and =+ (add).
-
The remove operator is quite different for roles than for properties.
To remove a role, we have sufficient information with:
remove <roleExpression>
The expression identifies the role instances that we want to remove. They are represented internally by identifiable data structures that we can find and destroy. Moreover, we can look up any references to them, so we can clean those up, too.
In contrast, to remove a property value, we not only have to find the role instance that bears the values to be removed, but we also need the name of that property (and, of course, the values to be removed). So we must write down both a <roleExpression> and the name of the property (an EnumeratedPropertyType):
EnumeratedPropertyType =- <valueExpression> from <roleExpression>
(we can omit the <roleExpression> from our expression if we want to operate on the current object set, but to effectually remove the values we do need role instances!).
These differences are great enough to justify different syntax for assignment to roles and assignment to properties.