(A, B)? Is Written as Any T? IsStatus: Accepted
Date: October 18, 2026
Answers: whether (A, B)? is written, which ADR-278 D1
ruled out without a reason; what split_once and every function that hands
back a pair that may be missing return
Related: ADR-278 D1, D10, D14 (T?, ?. reaches a member);
ADR-279 D1 (a ??’s fallback); ADR-352 (null
as a pattern); ADR-356 (a let takes a nested tuple); Part I
2.3; Part III’s NK1254
fn cut(path: ref String, sep: ref String) -> (String, String)? {
let at = path.find(sep) ?? return null
(path[0..<at].clone(), path[at + sep.len()..].clone())
}
A pair that may be missing is the result of split_once, of a search over a
list of pairs, of a map’s first entry. The value exists today: find over a
Vec[(String, i64)] gives one, and ?? return, let (a, b) = and a match
with a null arm take it. Only the type cannot be written, so no function
of the program and no std entry can return it.
| Option | Example | Why it lost | See |
|---|---|---|---|
| Keep the rule; a named struct per result | split_once -> Split? with before, after |
a type for each such function, and a type the language has but no one may name | D1 |
| The parts nullable | (String?, String?) |
says that either part may be missing alone, which is not the meaning | D1 |
A flag beside the parts (Go’s strings.Cut) |
(String, String, bool) |
the missing case can be read past; T? is how Nikaia says may be missing |
D1 |
(A, B)? is a type, written with the trailing ? as every T? is.A tuple type takes the ? after its closing bracket. It lowers to
Option<(A, B)>. Everything ADR-278 decides for a T? holds for it: a plain
tuple stands where it is wanted, ?? gets the tuple back, null is a pattern
in a match over it. NK1254 is retired and not reused.
?. reaches a part.p?.0 is the first part as a nullable, A?, as ?. reaches any member
(ADR-278 D10); p?.0?.x reaches further, a ?. at each step (ADR-278 D14).
p ?? ("", "") is a fallback of one value, the tuple, as ADR-279 D1 asks.
?. T? is any type that may be missing; an exception for
tuples has to be learned and gives nothing.Option<(A, B)> is common in Rust’s std
(split_once, Iterator::find over pairs, BTreeMap::first_key_value), and
the converter maps it one to one.(A, B)? among the nullable types; Part III
marks NK1254 retired.? after a tuple type, the checker’s
refusal goes, a test of each of D1-D3 and of the lowering. Then
String::split_once and rsplit_once can be std entries returning
the two halves as a nullable pair.Decided October 18, 2026.