diff --git a/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json b/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json index 19f217d91..860f0e48a 100644 --- a/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json +++ b/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json @@ -10,6 +10,17 @@ "raccourcis": "", "profils": ["All","Accessibility","Dark Mode","Debugging","DocC","Formatting","Instruments","Keyboard","Keynote","Localization","Optimization","Platforms State...","Regex","Shortcuts","Swift","Swift Playgrounds","SwiftUI","What's new in...","Xcode"] }, + { + "themes": "WWDC 2023", + "title": "Expand on Swift macros", + "type": [], + "tests": [], + "verifier": [], + "resultat": [], + "exception": "", + "raccourcis": "2023/23SwiftMacros", + "profils": ["All","Swift"] + }, { "themes": "WWDC 2023", "title": "Generalize APIs with parameter packs", @@ -120,6 +131,17 @@ "raccourcis": "2023/2310058", "profils": ["All","What's new in..."] }, + { + "themes": "WWDC 2023", + "title": "Write Swift macros", + "type": [], + "tests": [], + "verifier": [], + "resultat": [], + "exception": "", + "raccourcis": "2023/23SwiftMacros", + "profils": ["All","Swift"] + }, { "themes": "WWDC 2022", "title": "Adopt Variable Color in SF Symbols", diff --git a/src/en/mobile/images/iOSdev/wwdc23-10168_5.png b/src/en/mobile/images/iOSdev/wwdc23-10168_5.png index bf1349758..6aa1a644e 100644 Binary files a/src/en/mobile/images/iOSdev/wwdc23-10168_5.png and b/src/en/mobile/images/iOSdev/wwdc23-10168_5.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_1.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_1.png new file mode 100644 index 000000000..c4896eef0 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_1.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_10.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_10.png new file mode 100644 index 000000000..bb835c0a3 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_10.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_11.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_11.png new file mode 100644 index 000000000..cf1229d16 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_11.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_12.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_12.png new file mode 100644 index 000000000..b4e407763 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_12.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_13.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_13.png new file mode 100644 index 000000000..7c98a3174 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_13.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_14.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_14.png new file mode 100644 index 000000000..f4f0508b4 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_14.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_15.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_15.png new file mode 100644 index 000000000..8f3004cf9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_15.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_16.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_16.png new file mode 100644 index 000000000..92b50e3f5 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_16.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_17.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_17.png new file mode 100644 index 000000000..11ed2e2c3 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_17.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_18.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_18.png new file mode 100644 index 000000000..7dda2d78a Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_18.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_19.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_19.png new file mode 100644 index 000000000..f48a26d33 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_19.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_2.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_2.png new file mode 100644 index 000000000..378cab383 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_2.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_20.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_20.png new file mode 100644 index 000000000..743c35e94 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_20.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_21.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_21.png new file mode 100644 index 000000000..4abf38a7f Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_21.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_22.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_22.png new file mode 100644 index 000000000..5d5f4907d Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_22.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_23.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_23.png new file mode 100644 index 000000000..c0cf787a9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_23.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_24.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_24.png new file mode 100644 index 000000000..0420e6f87 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_24.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_25.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_25.png new file mode 100644 index 000000000..2f92d1a86 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_25.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_26.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_26.png new file mode 100644 index 000000000..7b1d4aed2 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_26.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_27.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_27.png new file mode 100644 index 000000000..77dff8bb2 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_27.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_3.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_3.png new file mode 100644 index 000000000..25d75c05f Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_3.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_4.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_4.png new file mode 100644 index 000000000..d4d1e1206 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_4.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_5.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_5.png new file mode 100644 index 000000000..29bcb5604 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_5.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_6.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_6.png new file mode 100644 index 000000000..768e34b67 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_6.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_7.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_7.png new file mode 100644 index 000000000..e1439a228 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_7.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_8.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_8.png new file mode 100644 index 000000000..b7a3aaeb9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_8.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_9.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_9.png new file mode 100644 index 000000000..31316fedf Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_9.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_Poster.png b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_Poster.png new file mode 100644 index 000000000..335fae93b Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-SwiftMacros_Poster.png differ diff --git a/src/en/mobile/ios/wwdc/nota11y/2023/23SwiftMacros.md b/src/en/mobile/ios/wwdc/nota11y/2023/23SwiftMacros.md new file mode 100644 index 000000000..19c45884e --- /dev/null +++ b/src/en/mobile/ios/wwdc/nota11y/2023/23SwiftMacros.md @@ -0,0 +1,310 @@ +--- +title : "Swift macros" +abstract: "Discover how Swift macros can help you reduce boilerplate in your codebase and adopt complex features more easily." + +displayToc: true +--- + +# WWDC 2023: Swift macros +Find hereafter a detailed summary of two videos that belong to a [taxonomy of some WWDC footages](../../). + +The original videos is available on the **Apple official website** ([session 10166](https://developer.apple.com/videos/play/wwdc2023/10166/), [session 10167](https://developer.apple.com/videos/play/wwdc2023/10167/)). + +![](../../../../../images/iOSdev/wwdc23-SwiftMacros_Poster.png) + +"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**." + +"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." +Hereafter, the underlined elements lead directly to the playback of the WWDC video at the appropriate moment. + + +## [The basics](https://developer.apple.com/videos/play/wwdc2023/10167/?time=46) +The [numerous reasons](https://developer.apple.com/videos/play/wwdc2023/10167/?time=120) for introducing the **macros with `Swift` `5.9`** are all different but head alltogether towards the **simplicity of code**. +![](../../../../../images/iOSdev/wwdc23-SwiftMacros_1.png) + +The **design goals** of these macros are fourthfold. + +![](../../../../../images/iOSdev/wwdc23-SwiftMacros_5.png) + +
+ +