Re: [poe] Define Atomic and Compound Constraint as subclasses

To clarify: the leftOperand and the rightOperand are properties and may become sub-properties of a operand property.
But how could this help? An Atomic Constraint has the properties leftOperand, operator and rightOperand, a Compound Constraint has in case of the operator andSequence the properties leftOperand, operator and rightOperand; in the case of or OR xor OR and the properties operand and operator? 
The result in design would be the Constraint Class has Atomic Constraint and Compound Constraint as subclasses and the Compound Constraint Class has the Ordered Compound Constraint and the Unordered Compound Constraint as subclasses as they have different properties and a different processing model.
Further a (n Unordered) Compound Constraint with multiple operands and a single operator has tripwires: 
* logical operators match only two operands, therefore a constraint with the operator "and" and 5 operands (O1...O5) would have to be expanded for processing in this way ((((O1 and O2) and O3) and O4) and O5) . This could be assumed for the operator "or" too.
* for "xor" is ((((O1 xor O2) xor O3) xor O4) xor O5) the expected expression?
* ... or should xor be restricted back to two operand properties?

Note: such a "many operands and 1 operator" Constraint subclass may look interesting in terms of a simplified/compact syntax but in the end all compactness has to be expanded to the atomic level.


-- 
GitHub Notification of comment by nitmws
Please view or discuss this issue at https://github.com/w3c/poe/issues/206#issuecomment-312427911 using your GitHub account

Received on Saturday, 1 July 2017 11:53:04 UTC