Design decisions

202. Printing an array over domains costs its size (2026-11-22)

  • Decision. print and ask of arrays over domains of fixed-size values, alongside fixed-size values, cost the sum of the arrays' sizes: print(d) for d: [V]Int is O(|V|), ask("?", g) for g: [V, V]Char is O(|V| * |V|). A fn's estimated cost uses the domains' most positions, as for stdlib methods (decision 195). Lists and strings still block an estimate, since nothing bounds their size here.
  • Why. print was the most common call left blocking an estimate in the ports. Fns with an estimated cost went from 35 to 38 of the 1,066 fns the scan reads.
  • Reverse. Drop io_terms and record_io in cpl-check's check/call.rs, restoring the fixed-size checks for print and ask.