File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,25 @@ CHANGELOG
2424Swift 5.0
2525---------
2626
27+ * [ SE-0235] [ ] :
28+
29+ The standard library now contains a ` Result ` type for manually propagating errors.
30+
31+ ``` swift
32+ enum Result <Success , Failure : Error > {
33+ case success (Success)
34+ case failure (Failure)
35+ }
36+ ```
37+
38+ This type serves a complementary role to that of throwing functions and initializers.
39+ Use ` Result ` in situations where automatic error propagation or ` try ` -` catch `
40+ blocks are undesirable, such as in asynchronous code or when accumulating the
41+ results of successive error-producing operations.
42+
43+ * ` Error ` now conforms to itself. This allows for the use of ` Error ` itself as
44+ the argument for a generic parameter constrained to ` Error ` .
45+
2746* Swift 3 mode has been removed. Supported values for the ` -swift-version `
2847 flag are ` 4 ` , ` 4.2 ` , and ` 5 ` .
2948
@@ -7406,6 +7425,7 @@ Swift 1.0
74067425[SE- 0227 ]: < https: // github.com/apple/swift-evolution/blob/master/proposals/0227-identity-keypath.md>
74077426[SE- 0228 ]: < https: // github.com/apple/swift-evolution/blob/master/proposals/0228-fix-expressiblebystringinterpolation.md>
74087427[SE- 0230 ]: < https: // github.com/apple/swift-evolution/blob/master/proposals/0230-flatten-optional-try.md>
7428+ [SE- O235]: < https: // github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md>
74097429
74107430[SR- 106 ]: < https: // bugs.swift.org/browse/SR-106>
74117431[SR- 419 ]: < https: // bugs.swift.org/browse/SR-419>
You can’t perform that action at this time.
0 commit comments