Repository navigation
spec v7.35: seven rulings of 2026-11-02 (D183–D189) - #2970
Merged
Merged
Conversation
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.
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).