- Learning Swift(Second Edition)
- Andrew J Wagner
- 273字
- 2021-07-16 12:33:09
Summary
This was a very dense chapter. We have covered a lot of ground. We have delved deep into defining our own custom types using structures, classes, and enumerations. Structures are great for simple types, while classes are great for types that require a hierarchy of related types. Enumerations provide a way to group related things together and express more abstract concepts through associated values.
We have also created our first project, which made use of multiple source files improving the maintainability of our code bases, especially at scale. Extensions can be used across and within those files to add additional functionality to existing types, including those not defined by us.
Finally, we developed a good understanding of what scope is and how we can control it to our advantage, especially with the help of access controls to give us an even more fine grained filter on what code can interact with other code.
Now that you have made it this far, you are well on your way to becoming a quality Swift programmer. I definitely recommend that you take a breather and experiment with everything that you have learned so far. We have only a few more concepts left to learn until we have all the tools necessary for creating a great app.
Once you are ready to move on, we can talk about optionals, which I have already hinted at. Optionals are somewhat complex but are an integral part of using the Swift language effectively. In the next chapter, we will pe deep into what they are and then how to take advantage of them in the most effective ways possible.
- 黑客攻防實戰技術完全手冊:掃描、嗅探、入侵與防御
- Application Development with Qt Creator(Second Edition)
- 物聯網之魂:物聯網協議與物聯網操作系統
- 物聯網安全與深度學習技術
- 走進物聯網
- 互聯網基礎資源技術與應用發展態勢(2021—2023)
- 信息通信網絡建設安全管理概要2
- Learning Swift(Second Edition)
- 城市治理一網統管
- OMNeT++與網絡仿真
- Unity Artificial Intelligence Programming
- 通信十年:擁抱互聯網
- 紅藍攻防:構建實戰化網絡安全防御體系
- Learning Node.js Development
- 移動物聯網:商業模式+案例分析+應用實戰