Skip to content

spec v7.35: seven rulings of 2026-11-02 (D183–D189) - #2970

Merged
ehartford merged 1 commit into
mainfrom
rulings-d183-d189
Nov 2, 2026
Merged

ehartford merged 1 commit into
mainfrom
rulings-d183-d189

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Docs-only (spec and decision log): D183 checked narrowing + §4.2.6 rationale (#2522, #2964), D184 script globals (#2951), D185 one comprehension family (#2960), D186 skip(n) and iterable zip/chain (#2961, #2962), D187 union borrow origins (#2965), D188 Duration (#2957), D189 no tuple-await cap (#2963), §14 examples (#2959). Eric ruled D183–D187 in session 2026-11-02; D186's iterables, D188, D189 delegated under D98. spec-inventory-check green; no battery (docs-only).

D183 checked integer narrowing, as is the wrap, isize positions, comptime
out-of-range is an error, the lint names the narrow declaration; §4.2.6's
rationale is 'as where two meanings remain'. D184 a script's top-level
bindings are module globals in statement order (§29.15). D185 one
comprehension family: the bracket form over Option/Result yields the
carrier of the element, the yield expression form is retired, the
statement form stays. D186 skip(n)/skip_while; zip/chain/zip_with take
any iterable. D187 returns borrow T from params N, M. D188 Duration is
i64 nanoseconds. D189 no tuple-await arity limit. §14's examples no
longer write Ok(...) or String. Eric ruled D183–D187 on the briefs of
2026-11-02; D186's iterables, D188 and D189 are delegated (D98).
Docs-only: the implementation is NON-COMPLIANT until it catches up.
@ehartford
ehartford merged commit 4f56482 into main Nov 2, 2026
@ehartford
ehartford deleted the rulings-d183-d189 branch November 2, 2026 16:51
This was referenced Nov 2, 2026
ehartford added a commit that referenced this pull request Nov 2, 2026
…ait arity cap (#2971)

* D186, D188, D189: skip(n), Duration over i64 nanoseconds, no tuple-await arity cap

D186: the iterator adapter that skips the first n elements is skip(n) and
its predicate form skip_while; drop(value) stays the prelude's release
form (Sema stage symbols, BuiltinSigs, std.traits iter_skip*, the List
adapter types, the two tests that spelled drop).

D188: std.time.Duration is a value type over i64 nanoseconds on every
target (D114), with nanos/micros/millis/secs/minutes/hours constructors,
the same as extensions on isize/i64/i32 so 50.millis() reads as §14
writes it, arithmetic and comparison, as_* accessors, Instant.now() with
elapsed(), sleep(Duration) and timeout(Duration). The lexer follows §30
FLOAT_LIT: a dot after digits is part of the number only when a digit
follows, so 50.millis() is a member access; behav_float's 10.-3.5 becomes
10.0-3.5. Tests that passed a bare integer to sleep now pass a Duration.

D189: tuple .await has no arity limit; the two Sema checks that stopped at
12 stop only below 2.

Spec v7.35 (#2970) rules all three; §4 and §7 examples use Duration.secs.

* std.time: timeout suspends like sleep, with no await in its body

An .await inside a std body made every program importing std.time a
concurrent one in Sema's eyes, and stage2 failed with E0921 data-race
diagnostics on the compiler's own globals. The evidence rule is filed;
timeout meanwhile sleeps the way sleep does.

* tests: retire the tuple-await arity fixture (D189); the temporary-exit library sleeps a Duration (D188)

---------

Co-authored-by: Eric Hartford <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant