Skip to main content
InterviewHubPRO
Section Overview
Q23

Question 23 of 50

Part 2: Concurrency, Actors & Advanced Architecture (11 - 24)

46%
Swift & Concurrency (50 Qs)•Part 2: Concurrency, Actors & Advanced Architecture (11 - 24)

How do Swift Macros (Freestanding vs Attached) transform syntax at compile time?

senior LevelFormsSystem Design

In Simple Words: Introduced in Swift 5.9, Swift Macros use SwiftSyntax to inspect code AST at compile time and emit new Swift code safely in sandboxed out-of-process compiler plugins.