|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/swift-macros/
课程评论:没有评论
## Swift 宏编程:Swift 宏编写指南 本课程是 Udemy 上的首门课程,专注于 Swift 5.9 中引入的 Swift 宏。通过本课程,您将学习如何利用 Swift 宏来增强语言功能,并在 Swift 语言的未来更新到来之前进行创新。课程内容紧凑,将三个月的研究精华浓缩在不到两小时的时间内,清晰有效地传递核心概念。 **课程大纲:** **第一模块:入门** * 宏的历史回顾 * Swift 宏的哲学基础 * Swift 宏的定义 * 本模块将为您进入 Swift 宏的世界提供入口。 **第二模块:概念预热** * 理解编译过程 * Swift 语法包 (SwiftSyntaxPackage) * 抽象语法树 (AST) * Swift 生态系统中的表达式与声明 * 本模块旨在建立坚实的概念模型,帮助您长久地掌握宏编程。 **第三模块:Swift 宏的组成部分** * 宏的角色 (Macro Roles) * 宏声明 (Macro Declarations) * 宏实现 (Macro Implementations) * 单元测试 (Unit Testing) * 编译器插件 (Compiler Plugins) * 本模块将介绍创建宏所需的工具和关键组成部分。虽然信息量较大,但对这些概念的理解将为后续的实践打下基础。 **第四模块:宏的实战操作** * 通过实际案例学习开发各种宏。 * 本模块将涵盖 Swift 5.9 版本所支持的宏的各种角色。 * 我们将模拟一个在实际编码中具相关性的用例,通过大约 30 分钟的时间进行开发。 **第五模块:总结** * 回顾学习的知识点。 * 认识到学习是一个持续的过程,鼓励您在实际项目中探索 Swift 宏。 * 讲解 Swift 包管理器 (SPM) 的打包和发布。 * 提供额外的学习资源和信息。 本课程旨在帮助您建立创建自己宏的信心,并深入理解 Swift 及其编译器的内部工作原理。
Swift Macros, introduced in Swift 5.9, open up new opportunities for enhancing the language and allow developers to innovate without waiting for future updates. This course offers a hands-on introduction to Swift Macros, helping you build confidence in creating your own macros through practical examples. You'll also gain an understanding of the internal workings of Swift and its compiler.As this is my first course on Udemy, Swift Macros hold a special place. The course is condensed three months of study into under two hours to deliver the core concepts clearly and effectively. Special care has been taken to ensure that the essence of the material is preserved while providing a concise learning experience.The course is divide into 5 moduleIntroduction - Covers the history of macro, provides insight into the foundation philosophy of swift macro and takes the narrative to define the swift macros. This module will be an entry point to the world of swift macros.Concept Warm up - Creating a mental model is a learning philosophy that can be applied to have a long lasting learning of construct. This requires having the foundational concept clarified where the story and logic can be weaved. This module talk about compilation, swift syntax package, abstract syntax tree and the expression/declaration in context of swift ecosystemComponents Of Swift Macro - Now that the foundation is laid, this module will introduce the tools for creating macros. Macro Roles, Macro Declarations, Macro Implementations, Unit Testing, and Compiler Plugins are essential aspects of macro development and will be covered in the module. As you go through this module, you might feel overwhelmed by the amount of information. The 20 minutes spent here will be valuable as the concepts become more apparent as you progress through the course. The subsequent section will reinforce these ideas with practical narrative.Handson with Macro's - Getting into action with developing various macros is the key outcome of the session. There are overarching concepts that repeat. Therefore the video is not going to specifics that which repeats itself rather with approx 30 mins we will cover developing a simulated use case which has relevance in real life coding. We will develop macros that encompass the different roles supported by the 5.9 version of swift.Conclusion - The final section where we summarise our learning and also be aware of the fact that the learning does not stop here, it will continue as you will explore the swift macro in a real project. We will cover the packaging and shipping of a macro spm and a slide that talks about additional learning information acquired.