Ben Rimmington
Ben Rimmington
> We can certainly precompute `startIndex` -- the big question there is if that will actually be helpful overall. I don't understand the [benchmark][] in the original API review. Does...
> Yep, this is a reasonable suggestion, for SetAlgebra. Unfortunately, it's not obvious whether to use a conditional `insert(_:)` or an unconditional `update(with:)` operation. -------------------------------------------------------------------------------- > > Some tools don't...
> These two types provide two different perspectives on the same underlying data structure. Ideally it ought to be possible to treat them as views of each other, making it...
> I'm not sure I follow how heterogeneous comparison operators reflect the ergonomics of inserting sequences of bits represented by fixed-width integers of varying bit widths? My argument was badly...
I think the Boolean subscript looks better with a `contains:` label. ```swift bits[contains: member] = true ``` The other subscripts could have an `intersection:` label. ```swift let lastMemberBelowFive = bits[intersection:...
You've missed a couple of doc fixes — the `members:` labels, and `Optional(5)`: ```swift /// let firstMemberNotLessThanFive = bits[5...].first // Optional(6) /// let lastMemberBelowFive = bits[..
For the `Codable` conformances: ```swift /// Bit arrays are encoded as an unkeyed container of `UInt` values, /// representing the total number of bits in the array, followed by ///...
> Keeping a precalculated count is important for some use cases though, so I added a separate `BitSet.Counted` type that implements it. "Multisets" or "bags" are sometimes called "counted sets",...
> and bit sets as unkeyed containers of their member values: `[0, 1, 3, 4, 6]`. This would make it possible to encode with `BitSet` and then decode with `SortedSet`....
* Should any of the following types be `@frozen`? - [`BitArray`](https://github.com/apple/swift-collections/blob/feature/BitSet/Sources/BitCollections/BitArray/BitArray.swift) - [`BitSet`](https://github.com/apple/swift-collections/blob/feature/BitSet/Sources/BitCollections/BitSet/BitSet.swift) - [`BitSet.Counted`](https://github.com/apple/swift-collections/blob/feature/BitSet/Sources/BitCollections/BitSet/BitSet.Counted.swift) - [`BitSet.Iterator`](https://github.com/apple/swift-collections/blob/feature/BitSet/Sources/BitCollections/BitSet/BitSet%2BBidirectionalCollection.swift) - [`_ChunkedBitsForwardIterator`](https://github.com/apple/swift-collections/blob/feature/BitSet/Sources/BitCollections/BitArray/BitArray%2BChunkedBitsIterators.swift) - [`_ChunkedBitsBackwardIterator`](https://github.com/apple/swift-collections/blob/feature/BitSet/Sources/BitCollections/BitArray/BitArray%2BChunkedBitsIterators.swift) * [Line 165 of BitSet+Extras.swift][] to match the stdlib...