Skip to content

Releases: pointfreeco/swift-identified-collections

0.4.0

20 May 15:15
2d6b7ff
Compare
Choose a tag to compare
  • Added: IdentifiedArray.append(contentsOf:), which appends elements to an array iff they are not already present (thanks @jeffersonsetiawan).
  • Updated: swift-collections dependency has been updated to 1.0.2 (thanks @KaiOelfke).
  • Updated: Identified Collections platform requirements have been relaxed.

0.3.2

20 Oct 19:12
Compare
Choose a tag to compare
  • Improved: performance of IdentifiedArray.== (thanks @mihaho).

0.3.1

08 Oct 19:43
Compare
Choose a tag to compare
  • Fixed: Identified arrays that specify a key path should no longer fail equatable checks when elements are equal (thanks @sroche27r).

0.3.0

13 Sep 21:31
c8e6a40
Compare
Choose a tag to compare

0.2.0

25 Aug 16:02
04502c8
Compare
Choose a tag to compare
  • Added: IdentifiedArray.elements, an array view of the identified array (thanks @p4checo).
  • Changed: IdentifiedArray.move(fromOffsets:toOffset:) and IdentifiedArray.remove(atOffsets:) no longer requires SwiftUI (thanks @gonzalolarralde).
  • Improved: IdentifiedArray.move(fromOffsets:toOffset:) and IdentifiedArray.remove(atOffsets:) are now much more performant.
  • Fixed: IdentifiedArray.partition now partitioning keys along with their values by calling down to the correct underlying implementation (thanks @tgt).
  • Fixed: stopped using a few APIs from Swift Collections that have been deprecated (thanks @diederich).

0.1.1

13 Jul 15:59
edececb
Compare
Choose a tag to compare
  • Fixed: removeLast(n:) renamed to removeLast(_:) (thanks @konomae).
  • Fixed: dependence on Swift Collections relaxed to 0.0.1.

0.1.0

11 Jul 22:23
Compare
Choose a tag to compare
  • Initial release!

What are the main differences between this library and the IdentifiedArray that shipped in swift-composable-architecture 0.20.0?

  • It is now a wrapper around OrderedDictionary from Swift Collections.

    This means we can lean on the performance and correctness of Apple's library and avoid many of the bugs discovered in the original implementation.

  • It no longer conforms to MutableCollection and RangeReplaceableCollection.

    We take the same position Swift Collections takes with OrderedSet and OrderedDictionary. All elements in an identified array should have unique identity, operations such as MutableCollection's subscript setter or RangeReplaceableCollection's replaceSubrange assume the ability to insert/replace arbitrary elements in the collection, but allowing that could lead to duplicate values. Methods have been deprecated or made unavailable with suggested migration paths.