swiftlang/swift

[SR-6865] Sorted collections

開放

#49,414 建立於 2018年1月29日

 (1 則留言) (0 個反應) (0 位負責人)Swift (10,719 個分叉)batch import
featuregood first issuestandard libraryswift evolution proposal needed

倉庫指標

星標
 (69,989 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Previous ID SR-6865
Radar rdar://problem/20340872
Original Reporter @airspeedswift
Type New Feature
Votes 1
Component/s Standard Library
Labels New Feature, StarterProposal
Assignee None
Priority Medium

md5: 5e738267ffe5dde28ff4e498aac141e3

Issue Description:

It would be useful to have sorted equivalents of Set, Dictionary and Array, that kept their elements in sorted order, and only required Comparable, or could take a custom comparator. SortedSet and SortedDictionary would probably be best represented by a tree, whereas SortedArray would be represented by contiguous storage and would need an API for efficiently adding new entries in bulk.

貢獻者指南