Design decisions

80. One prefix(a) spelling with L0513 (prefix_twin) (2026-11-21)

  • Decision: Standardize on prefix(a) as the single public spelling for static prefix sums across List<T>, [D]T, and [R, C]T. Keep prefix_n, prefix1, and prefix2 in stdlib/prefix.cp as the underlying monomorphic constructors dispatched by BUILT_ON, and add taste lint L0513 (prefix_twin) with cpl lint --fix rewriting prefix_n(a) / prefix1(a) / prefix2(a) to prefix(a).
  • Reason: The prelude already dispatches prefix(a) cleanly by argument type to PrefixN<T>, Prefix1<D, T>, and Prefix2<R, C, T>, so users never need to remember or import the dimension-suffixed helpers. Rewriting existing ports removes use std.prefix.{prefix_n} boilerplate and unifies the family under one guessable name without adding core privilege.
  • Reverse: Remove L0513 (PREFIX_TWIN) from crates/cpl-lint.