[API Review for 1.1] Hash-Array Mapped Prefix Trees
(née Persistent Collections)
- Authors: Michael Steindorfer, Karoy Lorentey
- Implementation: swift-collections/Sources/ShareableHashedCollections at release/1.1 · apple/swift-collections · GitHub
A while ago, Michael Steindorfer contributed a hash-array mapped prefix tree implementation to the Swift Collections package. This code has now bloomed into a new module that is very close to being production ready! One thing that is still missing is a critical review of the new API additions -- hence, this thread.
Background
The Swift Collections package is not currently governed by the Swift Evolution Process, but to leverage the immense collective knowledge & experience of the people using this package, we still follow an informal API review process that is similar to what is expected of Standard Library additions. Accordingly, we would like to gather feedback on the additions described in this document.
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, to determine the direction of the package. When writing your review, here are some questions you might want to cover:
-
Do you foresee ever using these new APIs in your own code? (Can you quickly describe your use case? E.g., how large is your typical data set? What operations are most interesting to you? Do you have particular performance requirements, such as about latency, throughput, or memory use?)
-
If you have used other libraries with a similar feature (in Swift or any other language), how do you feel that this proposal compares to those?
-
Do the proposed new APIs follow the Swift API naming guidelines? Are they a good fit with the Standard Library and the other packages in the Apple Swift Package Collection? Do any of the new APIs strike you as oddly named?
The current version 2 of this API proposal is available at the following link:
The text of the first version of the proposal (with PersistentCollections
) is still available at commit 1098c526 in the Git repository.