visitor-heterogeneous-traversal-generalizes-iterator-abstraction

Status: IN

Visitor's capacity to operate on objects without a common parent class structurally generalizes Iterator's traversal abstraction: while Iterator separates traversal from aggregate (requiring a uniform collection interface), Visitor separates operations from heterogeneous element structures (requiring no shared element type) — Visitor provides broader extensibility but demands more from element classes, trading the aggregate interface requirement for the Accept protocol.

Justifications

Visitor extends Iterator's traversal-action separation to heterogeneous type collections

Depends on (SL): gof-visitor-no-common-parent-required, iterator-separates-traversal-from-aggregate

JSON