Skip to content

Instantly share code, notes, and snippets.

@solarsailer
Created July 8, 2016 20:47
Show Gist options
  • Save solarsailer/cf639680e24293b9d96e5b91410d6ee3 to your computer and use it in GitHub Desktop.
Save solarsailer/cf639680e24293b9d96e5b91410d6ee3 to your computer and use it in GitHub Desktop.
Throwing functions
// Is there a reason to why the `throws` keyword is at this position:
func send() throws -> String {}
// Instead of…
throwing func send() -> String {}
// Like `mutating` is declared:
mutating func send() -> String {}
// To be consistant, throwing should be at the start of the declaration, right?
// Am I missing a message in the mailing list about that, or is there another reason?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment