Interface-Scoped Dispatch: Independent Components with O(1) Self-Calls
The conceptual attraction of object composition is its ability to freely build loosely coupled systems from independent runtime components. Yet practical limitations in today's languages prevent composition from fully realizing this potential, chiefly the inability to perform late-bound self-calls (open recursion), a defining strength of implementation inheritance. Filling this gap while retaining the essential properties of object composition remains an unmet challenge. We present Parts, a general delegation model that meets this challenge by unifying independent runtime components, arbitrary composition, and open recursion. Its enabling mechanism, interface-scoped dispatch (ISD), assigns composite identity per interface at construction, allowing self-calls to dynamically dispatch through overriding composites. Parts is realized as a compiler plugin for Java 8--26 with IDE integration. Its dispatch cost is O(1), empirically equivalent to a vtable call.
Authors
- Robert Scott McKinney
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-11
- DOI
- https://doi.org/10.5281/zenodo.22699258
- Primary Topic
- Advanced Software Engineering Methodologies
- Type
- preprint