-
Notifications
You must be signed in to change notification settings - Fork 58
Description
The byDimension, inverseOf, sequence, and bijection transformations must each contain one or more "child" transformations. Child transformations have some constraints relaxed and some constraints added, in a way which I found confusing in trying to implement the metadata scheme.
I think that it boils down to
- root transformations MUST have an
input/outputcoordinate system - child transformations MAY have a
input/outputcoordinate systems which- MUST be internally consistent
- MUST not conflict with the parent
- MUST be present if it's a byDimension (why?)
- any transformation may be a child of any other transformation, except sequences, which MUST NOT be a child of a sequence
- however, presumably a sequence is allowed as a grandchild of a sequence, e.g. if a sequence contained a byDimension and that contained a sequence
All in all, I'm not sure that the sequence-of-sequence restrictions is worth enforcing; it adds complexity for validation and, if anything, complicates implementations (see original comment here; pinging @will-moore for the counterpoint). There are other cases where nesting transformations is not the most efficient or clear way of describing a transformation (inverseOf(inverseOf(t)), bijection(t, inverseOf(t))), but enumerating all such combinations in the spec and then having every reader validate against each case adds unnecessary complexity. A blanket statement of
writer APIs SHOULD encourage clear, concise descriptions of transformations
allows writers to make ergonomic choices relevant to their domain, while readers can be permissive and just re-use the same parsing logic.
tl;dr proposals/ questions
- change the sequence-of-sequences MUST NOT into a SHOULD NOT, improving reader consistency
- why are input/output systems required for children of a byDimension? The sub-system is already implied by the parent's input/output and the child's inputAxes/ outputAxes. This improves reader and writer consistency
- to go the other way, could child transformations have a "SHOULD NOT contain input/output, and readers MAY choose not to validate". The value of determining the coordinate system halfway through a sequence or byDimension seems slim, and for the others it's just an extra opportunity for a footgun.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status