Comment Comment by kjksf Neither Swift nor Rust have exceptions, checked or otherwise.The kind of exceptions that unwind the stack until some part of the code up the stack catches the exception.They both handle errors by returning error values, kind of like Go.Rust has a try! macro, which might make you think it's try/catch equivalent, but it's not. It's just a syntactic sugar over error values.Similarly in Swift try/catch/throw is just syntactic sugar for handling error values.https://doc.rust-lang.org/book/error-handling.htmlhttps://developer.apple.com/library/content/documentation/Sw... parent kjksf 9 years ago
The kind of exceptions that unwind the stack until some part of the code up the stack catches the exception.
They both handle errors by returning error values, kind of like Go.
Rust has a try! macro, which might make you think it's try/catch equivalent, but it's not. It's just a syntactic sugar over error values.
Similarly in Swift try/catch/throw is just syntactic sugar for handling error values.
https://doc.rust-lang.org/book/error-handling.html
https://developer.apple.com/library/content/documentation/Sw...