polymorphic-iteration-bears-creational-cost-of-behavioral-abstraction

Status: IN

Polymorphic iteration imposes a creational overhead (heap allocation via factory methods, RAII cleanup via proxy objects) that non-polymorphic iteration avoids, making Factory Method the cost-bearer for Iterator's behavioral abstraction — concretely demonstrating that programming to an interface incurs creational infrastructure costs proportional to the abstraction's polymorphic requirements.

Justifications

The program-to-interface principle has concrete creational costs when applied to iteration

Depends on (SL): polymorphic-iterators-need-heap-and-raii, iterator-factory-method-creates-appropriate-iterator

JSON