2 posts tagged ‘NSError’
Swift Proposal: Typed Throws
SE-0413: Swift is known for being explicit about semantics and using types to communicate constraints that apply to specific APIs. From that perspective, the fact that all thrown errors are of type any Error feels like an outlier. However, it reflects the view laid out in the original error handling rationale that errors are generally […]
Rescuing Files From Classic Mac OS...with Swift
Jordan Rose: The biggest benefits of doing this project in Swift are very similar to what the benefits would have been for using C++, back in the 90s, but with even more safety. Take directory walking. In C, this looks something like the following: FSIterator *iter; OSStatus err = FSOpenIterator(&directory, kFSIterateFlat, &iter); if (err != […]