What each decision cost, and where several solve one problem
Every other document here argues for a decision. This one looks across the decided set and asks two questions no single document can: how often does one problem have several answers, and which decisions made another program worse.
Written after an outside review read the corpus rather than the docs and asked both. The counting is deliberately conservative — a multiplicity with a stated reason is not redundancy, and a cost with no program paying it is not a defect.
One problem, several answers
Five genuine overlaps. Two are already recorded as problems; three were not.
| problem | answers | status |
|---|---|---|
| leaving a scope | defer, with … as x { }, Scopeddefer | Resolved by deletion, 2026-11-20. Three constructs across two documents that each argued as if the others did not exist — aliasing.md twice reasoned from "elp has no defer, nothing at scope exit". with is deleted, Scoped is demoted to a marker, and defer x.release() is the whole answer. This is the first entry in this file closed by removing a mechanism rather than by adding one, and the audit's own middle-ground check is what it satisfies: before removing a capability, name the substitute — the substitute is defer, and it predates the thing removed. Still not mandatory, which is the real shape of the exactly-once question and is now a lint. |
| a property of a function body | pure, realtime, nonsuspending | resolved, and it cost two keywords. One mechanism, three members, one keyword each — which is the cost functions.md warned about and then paid. It now carries an admission test rather than a count, and that test rejected both further candidates: bounded is unverifiable, and thread affinity constrains callers rather than a body. realtime is still spelled two ways (realtime fn and @abi(.C, realtime)), which is the residue. |
| an immutable refcounted indirection | Shared<T>, indirect, string | not recorded. Identical machinery — immutable, refcounted, Copy by the same argument three times. What differs is use-site visibility: Shared<T> names a type and needs .get(), indirect is invisible, string is a primitive. That is a real axis and no document says it is the axis. |
| changing a value | .set(v), update(fn), copyWith(…), .copy() then mutate, field assignment | not recorded. .set(v) is exactly update(fn (&var t) { t = v }), kept because it is shorter. copyWith survives only in a reducer, where there is no cell. Defensible, undocumented as a set. |
| reading at an index | xs[i], xs.at(i), xs.get(i), xs.update(i, fn) | partly justified. collections.md argues the trapping and Optional forms both exist because both situations are real, which is right. [] and at being one operation with two names is not argued anywhere. |
And three things that look like overlaps and are not, recorded so they
stop being raised: by / Equatable / Hashable are layered rather than
alternative; backtick raw identifiers and \{ are the same idea in two
domains with no shared mechanism to unify; and Copy / Duplicate / Move
are one decision with three outcomes, which is the point of it.
One decision, another program's cost
Twelve, of which five have a program paying today and one has no payer at all. The last column is what makes this list worth keeping: a cost with nobody paying it is a prediction, not a finding.
| decision | what it bought | what it cost | paying |
|---|---|---|---|
string is immutable, so Copy | the tier of nearly every record; string leaves the CoW question | building a string is O(n²); no builder | Json writer and lexer |
| no tuple type | for k, v is record destructuring, one rule | a compound key allocates; enumerated() must yield a record | control-flow's by |
a..b includes both ends | 400..499 means what it reads | 0..n - 1 for n iterations | Sheet, Worker |
update(fn (&var T) -> R) | nine gaps at once | a failing transform leaves a partial write | Ledger FINDING 5 |
exclusivity between &var paths | no two live mutable paths | a pairwise element operation has no spelling | Ledger FINDING 1 |
Map.get returns V | one simple signature | a deep copy to ask a question about a field | Ledger FINDING 3, LruCache, Interpreter, Json |
| collections hold values, not places | no hidden aliases | a[i] = v has no spelling; [T] has no set | Editor FINDING 6 |
Index<K, V>.at -> V | a[i] reads well | unimplementable for a non-Copy payload | Json |
| a default method may not touch fields | encapsulation holds absolutely | a generic Codec is impossible, so codegen is forced | Json's macro |
by is mandatory | the forgotten-key bug cannot be written | a key on every markup loop | every .velp |
no loop | one spelling for one thing | no divergence information, no break value | Json's parser, as a dissent |
indirect is immutable | the container stays Copy; GAP 1 and the write surface stay separate | an in-place mutable recursive structure is unexpressible | nobody — the claim still holds |
The middle ground
The list above has a shape, and it is not "these decisions were wrong". Eleven of the twelve bought something worth more than they cost. The question is why five of them produced a defect rather than a cost.
A removal is affordable when a substitute exists at another layer.
Immutable string removes in-place building and [char].joined() replaces
it — a library answer, and the decision holds. No tuples removes positional
pairs and records replace them — a language answer, and the decision holds.
No loop removes a spelling and while true replaces it.
The defects are all places where two removals compose and the substitute is gone too.
Index.at -> VneedsV: Copy, and there is no borrowing accessor, becauseOptional<&V>is barred by a field not holding a borrow. Two removals, no substitute.- A pairwise element operation is refused by exclusivity, and the
move-out workaround is expensive because
Map.getreturns a value, and there is no transactional form. Three. a[i] = vis refused by values-not-places, and[T]has noset, andupdate(i, fn)is two closures deep at the one site that wants it.
So the middle ground is a check rather than a compromise: before removing a capability, name the substitute and confirm it is not itself removed. Cheap, mechanical, and it would have caught all three — each is a pair of decisions made in different documents months apart, neither wrong on its own.
That is the same failure core-language-probes.md §16 found one level down,
where three rules had been checked against the case that motivated them and
not against the set they governed. The corpus-wide version is this: a
decision is checked against the program that asked for it, and the cost
lands on a program written later.
Remediation, and what each one costs the language
Five findings were put at the top of the agenda by an outside review. The column that matters is the last one, because the review's own caution is the right one: a finding discharges in one of four ways and only one is a new construct.
| finding | remediation | language cost |
|---|---|---|
| cancellation unwinds a transform | nonsuspending, the third body property — and the restriction that fixes it was already owed | one property, and viral marking on helpers |
freeing a deep indirect chain recurses | a stated runtime obligation; rule 4 is what makes an iterative drop or pointer reversal available to the runtime | none |
| multi-object atomicity | nest the transform: the outer holds the lock and cannot suspend, the inner two are sequential so their borrows never overlap | none — examples/Ledger FINDING 1 was wrong |
a by key from untrusted data | move the assertion onto the collection: a Keyed<K, T> built by a fallible constructor, and a for over one needs no by | one rule, plus stdlib |
| resource-bounded computation | nothing at language level; the limits stay the program's | none — the bounded property is withdrawn |
Two of the five cost nothing and one of those is a correction to a probe rather than to the language, which is the distribution to expect if the corpus is doing its job. One costs a property the design had already promised. One costs a rule and a library type and is not ratified. And one costs nothing because the proposal was wrong.
The property that was withdrawn is worth more than the three that landed.
bounded looked like a fifth body property and cannot be one: a function
with no recursion can loop a number of times its input chooses, and one
allocating a fixed amount per iteration has no useful upper bound either. A
closed set of forbidden operations sees neither, so the property would
promise what no checker could deliver — and an over-promising property is
worse than none, because people rely on it. The mechanism is attractive
enough to be reached for carelessly, which is the first evidence that it
needs a stated admission test rather than a growing list of members.
What the language owes instead, in that last row, is narrower and real:
the three places it does unbounded work on a program's behalf, where
the program cannot intervene — .copy()'s depth, the refcount cascade, and
the macro evaluator's step count. Runtime obligations, not properties.
What this file is not
It is not a list of regrets and it should not become one. A design with no costs in this table would be a design that had refused nothing, and the refusals are most of what makes this language a particular language rather than a collection of features.
The entries worth acting on are the five with a payer, and of those the two
with no substitute at all — the pairwise operation and the borrowing read —
are one decision away from each other: both dissolve if Optional<&V> is
answered.