Meet async/await
A look at the async/await that landed in Swift 5.5, set against the completion handlers that came before it. Delivered in Japanese.
Everything with this tag, newest first, across all four kinds.
A look at the async/await that landed in Swift 5.5, set against the completion handlers that came before it. Delivered in Japanese.
Up to Swift 5.0 you had to write .some(.daily). In 5.1 you can write .daily directly.
Working mostly on iOS means re-remembering how to write Kotlin's when every time, so here the two are side by side.
Why slicing an Array hands you an ArraySlice rather than an Array — it is a view onto the original storage, not a copy.
Void is a typealias for the empty tuple. Starting there, a short look at how the two behave.
Using JSONDecoder's keyDecodingStrategy and keyEncodingStrategy to absorb the difference in naming conventions without hand-writing CodingKeys.
Two approaches for preventing typos in keys and mismatched types — wrapping UserDefaults, and using Mirror.