Diploma in Apple Development 🍎👩🏻‍💻: Coding One: Lecture 10: Macros, Access Control and Advanced Operators
Back to slide index.
👋🏻 Hi!
First, don't forget to confirm your attendance using the Seats Mobile app!
Second, I'm going to start every lecture with a meditation from the fantastic Sitting Still Like a Frog book, all read by Myla Kabat-Zinn. If you don't want to participate that's completely fine.
To start let's read this article on Applying Macro's to discover what they are.
Next, let's watch a WWDC video:
"Expand on Swift macros" (40 mins)
"Discover how Swift macros can help you reduce boilerplate in your codebase and adopt complex features more easily. Learn how macros can analyze code, emit rich compiler errors to guide developers towards correct usage, and generate new code that is automatically incorporated back into your project. We'll also take you through important concepts like macro roles, compiler plugins, and syntax trees."
Let's watch another WWDC video:
"Write Swift Macros" (34 mins)
"Discover how you can use Swift macros to make your codebase more expressive and easier to read. Code along as we explore how macros can help you avoid writing repetitive code and find out how to use them in your app. We'll share the building blocks of a macro, show you how to test it, and take you through how you can emit compilation errors from macros."
Let's continue by looking at what the Swift Book says about Macros.
Let's keep going by looking at what the Swift Book says about Access Control.
Let's finish by looking at what the Swift Book says about Advanced Operators. Do any of you know how to count in binary?
Homework:
  1. Review today's content.
  2. Slack me with any problems or queries. See you on Friday for the next Spatial lecture, the next ML lecture is first, on Thursday from 0930.
Thanks!
Back to slide index.