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 合并指标
 (平均合并 8天 17小时) (30 天内合并 510 个 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.

贡献者指南