# \[Accepted with Modifications\] SE-0235: Add Result to the Standard Library

**URL:** <https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603>\
**Category:** Announcements\
**Created:** [December 6, 2018, 1:09am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603 "2018-12-06T01:09:50Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![John\_McCall](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/john_mccall/32/1351_2.png) [@John\_McCall](https://forums.swift.org/u/John_McCall)\
**Post date:** [December 6, 2018, 1:09am UTC](https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603/1 "2018-12-06T01:09:50Z")

</div>

Hello, Swift Community.

The review for the revisions to [SE-0235: Add `Result` to the Standard Library](https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md) ran from November 28th through December 2nd. You can find the review thread [here](https://forums.swift.org/t/revised-se-0235-add-result-to-the-standard-library/18371). There was also [an earlier round of review](https://forums.swift.org/t/se-0235-add-result-to-the-standard-library/17752) for the initial proposal.

The community provided a lot of very good feedback on the proposed revisions. Almost all of it was strongly positive about the revised proposal overall, but many community members expressed reservations about various aspects of it. The Core Team discussed this feedback today and reached several conclusions:

- While several members of the community supported naming the cases `value` and `error`, overall people seemed to prefer the original proposal's case names: `success` and `failure`. After considering this feedback, the Core Team has come to agree that these are excellent "semantic" names which work better than `value` and `error` as labels for the current state of a `Result` value. They read more fluently when constructing a `Result` or pattern-matching on it, especially when the value type is `()`, and they avoid confusion over the fact that a `Result` is itself a value.

- Many people in the community strongly supported requiring `Failure` to conform to `Error`, although this was not universal. The Core Team remains convinced that this is the right thing to do. We do not see any need to add new conformances to `Error` for library types like `Array`.

- Several members of the community voiced disappointment that the proposal did not include a variant of `flatMap` that took a throwing closure. The Core Team reaffirms its desire to never overload methods by whether an argument function can throw. We spent quite some time debating whether a different name would be acceptable, such as `flatMapThrowing`, but were unable to reach consensus on this, especially as there are alternative means of expressing this using the catching initializer.

- Several members of the community expressed dislike of the name `unwrapped()`, as it seems insufficiently "active" for an operation that is essentially designed to throw as a core part of its operation. The Core Team agrees and also feels that `unwrapped` is awkward because nothing else about `Result` uses "wrapping" as an analogy. Furthermore, a similar operation will be needed on other computation-related types like `Future`, and it would be good for these to share a consistent name. The Core Team debated this and ultimately settled on `get()`. That this operation can throw should be apparent enough from the mandatory use of `try` before the call.

The Core Team acknowledges the call from several reviewers to make a special effort to communicate how we think `Result` ought to be used in Swift. We absolutely agree that is an important part of adding `Result` to the language, and we intend to provide this guidance as part of the release.

Although we are revising the proposal again, the Core Team feels that these issues have already received adequate review, and there is no need for a third round of review. Accordingly, SE-0235 has been **Accepted with Modifications**.

Please remember that there will be opportunities to extend this type in the future.

As always, thank you for helping to make Swift a better language.

John McCall  
Review Manager

---

_[View the full topic](https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603)._
