- Learning Swift(Second Edition)
- Andrew J Wagner
- 263字
- 2021-07-16 12:33:07
Summary
In this chapter, we have developed a great basis for Swift knowledge. We have learned about the various built-in mechanisms Swift has for representing complex information in expressive and accessible ways. We know that, by default, we should declare information as a constant until we find a practical need to change it, and then we should make it a variable. We have explored how every piece of information in Swift has a type associated with it by the compiler, whether it is through type inference or declared explicitly. We are familiar with many of the built-in types, including simple types like String, Int, and Bool as well as containers like tuples, arrays, and dictionaries. We can use the console output to better investigate our programs, especially by using string interpolation for dynamic output. We recognize the power of controlling the flow of our programs with if statements, conditionals, switches, and loops. We have functions in our skill set to write more legible, maintainable, and reusable code. Finally, we have seen an example of how all of these concepts can be combined to write a full program.
As a challenge to you, I suggest you fix the final program so that it stops trying to assign shows if there are not enough invitees. When you can do that, you are more than ready to move on to the next topic, which is types, scopes, and projects.
These are all tools that we can use to write even more organized code and they will become more critical as we write larger and larger projects.
- 物聯網與北斗應用
- 物聯網工程規劃技術
- 物聯網關鍵技術及應用
- 面向云平臺的物聯網多源異構信息融合方法
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- Spring 5.0 Projects
- 物聯網之霧:基于霧計算的智能硬件快速反應與安全控制
- 智慧光網絡:關鍵技術、應用實踐和未來演進
- CCNP TSHOOT(642-832)認證考試指南
- Windows Server 2012 Hyper-V虛擬化管理實踐
- 計算機網絡技術及應用
- 深入理解OpenStack Neutron
- 物聯網頂層設計與關鍵技術
- 物聯網工程導論(第3版)
- Practical Web Penetration Testing