[swift-evolution] Move placement of 'throws' statement

Georgios Moschovitis george.moschovitis at icloud.com
Tue Dec 27 06:32:01 CST 2016


Indeed,
func baz() throws -> String
is confusing. I do prefer these two alternatives:
// Move `throws` to the end
func baz() -> String throws

// Change it to a prefix modifier (like `mutating`)
throwing func baz() -> String
I think I prefer the first one (throws at the very end).

I wouldn’t mind this source-breaking change.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161227/02abf17e/attachment.html>


More information about the swift-evolution mailing list