Top-level Swift code - scripts and playgrounds - can use await directly without needing to wrap everything in a task or a dedicated @main type. A genuine quality of life win for scripting and quick experiments. www.hackingwithswift.com/swift/5.7/to...
hackingwithswift.com
Concurrency in top-level code – available from Swift 5.7
Concurrency in top-level code example code from Swift 5.7