I can see some use cases where visitors might want to quit walking the hierarchy early, e.g. a validator visitor that exits on the first error, or a counter visitor that exits when a certain count is reached.
A few questions need to be answered:
- Does anyone need this?
- Should
Visitor / Drive be subtraits of FallibleVisitor / FallibleDrive that panic on error, or should these be completely separate traits?
- Are
Result type, "fallible", etc applicable terminology for this? Early exit doesn't always mean error.
I can see some use cases where visitors might want to quit walking the hierarchy early, e.g. a validator visitor that exits on the first error, or a counter visitor that exits when a certain count is reached.
A few questions need to be answered:
Visitor/Drivebe subtraits ofFallibleVisitor/FallibleDrivethat panic on error, or should these be completely separate traits?Resulttype, "fallible", etc applicable terminology for this? Early exit doesn't always mean error.