Corrects 25 misspellings across DocC articles, design documentation and doc
comments. Prose only: no identifiers, no public API, no behaviour change.
| Typo | Correction | Count |
|---|---|---|
| `offseting` | `offsetting` | 7 |
| `valud` | `value` | 4 |
| `necessarilly` | `necessarily` | 3 |
| `recommmend` | `recommend` | 2 |
| `Mutablility` | `Mutability` | 1 |
| `childs` | `child's` | 1 |
| `constaints` | `constraints` | 1 |
| `destintion` | `destination` | 1 |
| `explan` | `explain` | 1 |
| `forcuses` | `focuses` | 1 |
| `ot` | `or` | 1 |
| `succcess` | `success` | 1 |
| `unqiue` | `unique` | 1 |
Two of these are worth a second look, since they are not pure spelling:
- `_HTable+Removal.swift:18` reads "without marking it as unoccupied ot
restoring the hash table's other invariants". Read as `or`, matching the
sentence, and deliberately not as a prefix of `other` later on the line.
- `_Node.UnsafeHandle+Deletion.swift:369` reads "reuse the left childs node".
Corrected to the possessive `child's` rather than `children`, which is what
a plain spellchecker suggests but does not fit the sentence.
`valud` is corrected to `value` to match the wording of the equivalent
parameter documentation on `swapAt(_:_:)`.
One change is outside documentation: `CheckContainer.swift:476` fixes
`succcess` inside a test assertion message. It is a human-readable string, not
an expected value, so no test behaviour changes.
Deliberately left alone:
- `isDisjoint(with:)-54iy6` in `OrderedSet.md` is a DocC disambiguation hash,
not a misspelling.
- `Peristent` in the 2022 ShareableHashedCollections review document, which is
an archived record of a past review rather than living documentation.
Found with `typos-cli`, then reviewed by hand; the tool's raw output also
flagged identifiers and symbol hashes, which are not included here.
Don’t just append new items to the end of storage — it misleads clients into assuming that the containers preserve insertion order, when they most certainly don’t do that.
Instead, insert new items into the middle of storage, using an extra swap.
We don’t need to calculate the probe length of the item currently occupying the new item’s ideal bucket — it cannot possibly be lower than the new item’s. This spares one hash operation during insertions that result in a hash collision.
Due to a number of cascading off-by-one errors, the maximum probe length could end up getting set lower than the actual value, _sometimes_ rendering some items unreachable.
Weirdly, the issue seems to be rare enough that it somehow never triggered in any of my previous test runs.
- UnstableNoncopyableKeys → UnstableHashedContainers
- Delete the GeneralizedEquatable and GeneralizedHashable protocols, replacing them with the standard generalizations in the 6.4 stdlib
- Require Swift 6.4 for {Rigid,Unique}{Set,Dictionary}.
Renaming `_Htable+Debugging.swift` to `_HTable+Debugging.swift` did not stick — rename the file to `_HTable+Debug.swift` to get rid of the lowercase t for good.
This is a nongeneric type, so it makes sense to see if Swift has matured enough to use opaque/resilient types in high-performance contexts. It would be ideal if the core hash table implementation would remain flexible.
We may need to sprinkle some effect attributes over these.