Skip to content

Commit 24205cb

Browse files
committed
Merge pull request swiftlang#206 from erica/updatedPlayground
updated SE-0039 playground proposal to match core team feedback
2 parents 63673e3 + fbf89b2 commit 24205cb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

proposals/0039-playgroundliterals.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,23 @@ In this design:
6565
## Alternatives Considered
6666

6767
`#resourceliteral` may better describe a file resource than `#fileliteral`.
68+
69+
## Accepted Form and Modifications
70+
71+
The community and core team uniformly agree that this proposal increases uniformity in the Swift language. This proposal is accepted with the following modifications.
72+
73+
#### Casing
74+
After discussing how to rationalize naming and capitalization of identifiers in the “#” namespace, the core Swift team has adopted a [lower camel case](https://en.wikipedia.org/wiki/CamelCase) model for identifiers.
75+
76+
#### Argument labels
77+
The argument label for `imageLiteral` is renamed to `resourceName`. This better describes the parameter's role and avoids needless words. This modification follows [SE-0006](https://github.com/apple/swift-evolution/blob/master/proposals/0006-apply-api-guidelines-to-the-standard-library.md)'s naming guidance.
78+
79+
#### Accepted design
80+
81+
The accepted design for the literals are:
82+
83+
```swift
84+
#colorLiteral(red: 0, green: 0, blue: 0, alpha: 0)
85+
#imageLiteral(resourceName: "foo")
86+
#fileLiteral(resourceName: "bar")
87+
```

0 commit comments

Comments
 (0)