Providing a unified Swift error API
John Sundell
947

What do you think, should the swift compiler allow for declaring the type of throwable functions or not? I would love to write

func loadSearchData(matching query: String) throws SearchError -> Data {

instead of

func loadSearchData(matching query: String) throws -> Data {

but only as an opt-in feature…

Show your support

Clapping shows how much you appreciated Håvard Fossli’s story.