Yakov Manshin

Swift Macros Deep Dive (Part 1)

All You Need to Know

In the first part of this Swift Macros Deep Dive, I explain why macros were introduced to Swift, what you can do with them, how and when they function (“expand”), and how their flavors (attached and freestanding—but that’s not all) differ from each other.

Also watch the second part where I demonstrate how you can write, debug, and test your own macros.