Skip to content

RFC5: clarify delineation, if any, between "root" transformations and "child" transformations #359

@clbarnes

Description

@clbarnes

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/output coordinate system
  • child transformations MAY have a input/output coordinate 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

  1. change the sequence-of-sequences MUST NOT into a SHOULD NOT, improving reader consistency
  2. 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
  3. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions