Performance-critical systems commonly optimize memory use and locality by selecting among multiple variants of a single logical operation. For example, when an argument would otherwise no longer be used, a program may use an algorithm mutating that argument in place. Algorithm developers then typically rely on ad-hoc API patterns or naming conventions to distinguish the variants. Unfortunately, this practice suffers from poor ergonomics. Users are compelled to understand the conventions and carefully consider the signatures and documentation of different variants, which creates drag on development and maintenance.

Instead, we propose a language construct bundling algorithm variants having well-defined semantic relationships under a single name. This approach eliminates boilerplate and cognitive overhead for the user by consolidating APIs, and allows the compiler to automatically select the most efficient variant for a given context.