Zum Inhalt springen
Kitbay
Skill

write-swift

MITAktualisiert am 9. Nov. 202655.996GitHub-Sterne

A skill from Emil Kowalski's collection for writing, reviewing or migrating Swift code the way the language intends, based on Swift 6.3 with the 6.2 concurrency model and marked notes on the unreleased 6.4.

Was der Skill vermittelt

A skill from Emil Kowalski's collection for writing, reviewing or migrating Swift code the way the language intends, based on Swift 6.3 with the 6.2 concurrency model and marked notes on the unreleased 6.4. Its central rule is to start with the simplest option, structs before classes, concrete types before protocols, synchronous main-actor code before async, actors or unsafe pointers, and move up only with a stated reason. Sections cover value types, errors and optionals, concurrency and Sendable fixes in a set order, structured concurrency, SwiftUI, protocols and generics, API naming, performance and ARC, Swift Testing, macros, logging, unsafe code and interop, modern syntax and a step-by-step migration to Swift 6.

Funktionen

  • Choose the simplest Swift construct that works
  • Fix Swift 6 data race errors in order
  • Write tests with Swift Testing
  • Plan a migration to Swift 6