Skip to content

Remove the hand-written Vec.sort and Vec.swap (sorting comes from STC, Phase 3) - #2280

Merged
ehartford merged 1 commit into
mainfrom
drop-native-sort
Oct 9, 2026
Merged

ehartford merged 1 commit into
mainfrom
drop-native-sort

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Sorting comes from the migrated corpora (docs/proposals/stdlib_sourcing_plan.md, D37): STC's algorithm layer behind the std.algorithms facade, Phase 3, which closes #940. libstd-spec §1.2: "Nothing native is written for this section." The heapsort from #2274 was a native rewrite, public under names no spec text defines, and unstable. Only its own test called it. Gate green; the battery runs with the STC stack above it.

Sorting comes from the migrated corpora (docs/proposals/
stdlib_sourcing_plan.md, D37): STC's algorithm layer, migrated whole and
exposed through the std.algorithms facade in Phase 3, which closes #940.
libstd-spec §1.2: "Nothing native is written for this section." The
heapsort added in #2274 was the native rewrite the ruling rejects, under
public names no spec text defines (and unstable, which Python's and
Rust's `sort` are not). Nothing outside its own test called it.
@ehartford
ehartford added this pull request to stack #2287 October 9, 2026 04:33
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery GREEN on f329092 (stack top: #2280, #2284, #2285, #2286), with run tools/battery.w: gate rc=0 (605 s), uat rc=0 (97 s), battery-checks rc=0 (1213 s), fixpoint and the drop and move audits included.

The first battery, on 859e562, was red. It found three defects the fixed-array default had hidden, plus a red main, all fixed in f329092 and f57ba3c:

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.

stdlib has no sort

1 participant