Section 19/201 menit
19. Evolusi Timeline & Keputusan Desain
19. Evolusi Timeline & Keputusan Desain
swift
Swift 5.5 (2021) — FONDASI
├── async/await: ganti callback → linear code
├── Structured Concurrency: lifetime & cancellation guarantee
├── actor: thread-safe mutable state
├── @MainActor: UI thread safety
└── AsyncSequence/Stream: pull-based streaming
Swift 6.0 (2024) — ENFORCEMENT
├── Complete Concurrency Checking: warning → error
├── Sendable enforcement: type system boundary
├── sending: transfer ownership explicitly
├── nonisolated(unsafe): controlled escape hatch
├── @preconcurrency: backward compat bridge
└── Global actor: stricter inference
Swift 6.1 (2025) — GRANULARITY
├── nonisolated stored property: per-property control
├── Improved inference: less annotation noise
└── @isolated(any): isolation-carrying function types
Swift 6.2 (2025) — ERGONOMICS
├── Default module isolation: less boilerplate
├── Task naming: better debuggability
├── async let cancellation: more deterministic
└── nonisolated init: sync object creation
Filosofi evolusi:
- 5.5: Berikan tools yang benar
- 6.0: Enforce penggunaan yang benar
- 6.1: Kurangi friction di edge cases
- 6.2: Kurangi boilerplate, tingkatkan ergonomics