|
|
|
|
|
by Someone
4024 days ago
|
|
Agreed. Also, it does look different aka innovative to me: func loadData() throws { }
func test() {
do {
try loadData()
} catch {
print(error)
}
}
I guess that you have to prefix any statement that might throw with 'try', and cannot prefix other statements with it.If so, their motto really seems to be 'explicit over implicit'. I'm not sure that is an improvement, but I'm not sure that it is bad, either, provided that the refactoring tools work fine (for example when one removes that "throws" from the definition of loadData) |
|
I wonder why they insist on that. Perhaps it is easier to parse?