- Learning Swift(Second Edition)
- Andrew J Wagner
- 169字
- 2021-07-16 12:33:07
Chapter 3. One Piece at a Time – Types, Scopes, and Projects
In Chapter 2, Building Blocks – Variables, Collections, and Flow Control, we developed a very simple program that helped organize a party. Even though we separated parts of the code in a logical way, everything was written in a single file and our functions were all lumped together. As projects grow in complexity, this way of organizing code is not sustainable. In the same way we use functions to separate out logical components in our code at scale, we also need to be able to separate out the logical components of our functions and data. To do this, we can define code in different files and we can also create our own types that contain custom data and functionality. These types are commonly referred to as objects, as a part of the programming technique called object-oriented programming. In this chapter we will cover the following:
- Structs
- Classes and inheritance
- Enumerations
- Projects
- Extensions
- Scope
- Access control
- 黑客攻防實戰(zhàn)技術(shù)完全手冊:掃描、嗅探、入侵與防御
- 物聯(lián)網(wǎng)智慧安監(jiān)技術(shù)
- TCP/IP入門經(jīng)典(第5版)
- Oracle SOA Suite 11g Performance Tuning Cookbook
- 物聯(lián)網(wǎng)信息安全
- 計算機網(wǎng)絡(luò)原理與應(yīng)用技術(shù)
- 數(shù)字調(diào)制解調(diào)技術(shù)的MATLAB與FPGA實現(xiàn):Altera/Verilog版(第2版)
- 邁向自智網(wǎng)絡(luò)時代:IP自動駕駛網(wǎng)絡(luò)
- 基于性能的保障理論與方法
- 網(wǎng)管第一課:網(wǎng)絡(luò)操作系統(tǒng)與配置管理
- Learning Storm
- 網(wǎng)絡(luò)工程實施技術(shù)與方案大全
- Selenium WebDriver 3 Practical Guide
- 5G非正交多址接入技術(shù):理論、算法與實現(xiàn)
- 物聯(lián)網(wǎng),So Easy!