Skip to content

Commit 3b04061

Browse files
benrimmingtonlattner
authored andcommitted
[SE-0214] Accepted with revisions (KeyValuePairs) (#862)
1 parent f13edd7 commit 3b04061

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

proposals/0214-DictionaryLiteral.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
# Renaming the `DictionaryLiteral` type to `KeyValueList`
1+
# Renaming the `DictionaryLiteral` type to `KeyValuePairs`
22

33
* Proposal: [SE-0214](0214-DictionaryLiteral.md)
44
* Authors: [Erica Sadun](https://github.com/erica), [Chéyo Jiménez](https://github.com/masters3d)
55
* Review Manager: [Chris Lattner](https://github.com/lattner)
6-
* Status: **Active review (May 18...23)**
6+
* Status: **Accepted with revisions**
77
* Implementation: [apple/swift#16577](https://github.com/apple/swift/pull/16577)
8+
* Decision Notes: [Rationale](https://forums.swift.org/t/accepted-with-revision-se-0214-renaming-the-dictionaryliteral-type-to-keyvaluepairs/13661)
9+
* Previous Revision: [1](https://github.com/apple/swift-evolution/blob/12315c44dd6b36fec924f4f6c30f48d8784ae4cc/proposals/0214-DictionaryLiteral.md)
810

911
## Introduction
1012

11-
This proposal renames the confusing and misnamed [`DictionaryLiteral`](https://github.com/apple/swift/blob/c25188bafd1c775d4ceecc4a795f614f00451bf9/stdlib/public/core/Mirror.swift#L646) type to `KeyValueList`. This type is neither a dictionary nor a literal. It is a list of key-value pairs.
13+
This proposal renames the confusing and misnamed [`DictionaryLiteral`](https://github.com/apple/swift/blob/c25188bafd1c775d4ceecc4a795f614f00451bf9/stdlib/public/core/Mirror.swift#L646) type to `KeyValuePairs`. This type is neither a dictionary nor a literal. It is a list of key-value pairs.
1214

1315
There is no strong motivation to deprecate. The type does not produce active harm. Instead, it adds measurable (if small) utility and will be part of the ABI. A sensible renaming mitigates the most problematic issue with the type.
1416

@@ -67,7 +69,7 @@ This key-value pair processing might support custom initializers. It allows dupl
6769

6870
## Detailed Design
6971

70-
`DictionaryLiteral` is renamed to `KeyValueList`. A typealias preserves the old name for compatibility but can be deprecated as of Swift 5.0.
72+
`DictionaryLiteral` is renamed to `KeyValuePairs`. A typealias preserves the old name for compatibility but can be deprecated as of Swift 5.0.
7173

7274
This name was extensively bikeshedded on the [Swift Forum thread](https://forums.swift.org/t/100-bikeshed-topic-dictionaryliteral/7385) before proposal. The runner up name was `KeyValueArray`.
7375

0 commit comments

Comments
 (0)