v3.0.0
This release of BTree provides support for Swift 3.0, which involves extensive breaking API changes.
- All API names have been reviewed and renamed to follow current Swift guidelines. (See SE-0023, SE-0005, SE-0006, SE-0118, and possibly others.) The resulting changes are too numerous to list here. Unfortunately, resource constraints prevented me from including forwarding availability declarations for renamed APIs; fixits won't be available, you'll have to rename usages in your code by hand. (Sorry about that.)
- BTree's collection types now implement the new collection model described in SE-0065.
BTreeIndex
has been stripped of its public methods; use the new index manipulation methods in the various collection types instead. The underlying implementation hasn't been changed, but making the standalone index methods internal now allows for experimentation with more efficient indices without breaking API changes in the future. OrderedSet
was renamed toSortedSet
, to prevent confusion with the similar class in Foundation. For a short while, SE-0086 renamedNSOrderedSet
toOrderedSet
in the Foundation framework, leading to a naming conflict withBTree
. This was further aggravated by a naming lookup issue in the language itself that made it impossible to use the explicit nameBTree.OrderedSet
to work around the conflict.NSOrderedSet
was quickly changed back to its original name, but the issue revealed that the two names are much too similar.SortedSet
was adapted to implement the newSetAlgebra
protocol in SE-0059.List
s that contain objects now have anarrayView
property that returns anNSArray
with the exact same values as theList
in O(1) time. This is useful for using B-tree based lists in APIs that need arrays, without copying elements. (For example, you can now useNSCoder
to encodeList
s directly.)- Collection protocol conformance has been improved.
List
now explicitly conforms toRandomAccessCollection
, whileMap
andSortedSet
are nowBidirectionalCollection
s. This required no major changes as these types already implemented everything that was necessary for conformance to these stricter protocols, but now conformance is made explicit.