官术网_书友最值得收藏!

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 us 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. Just as we use functions to separate out logical components of our code, at scale, we also need to be able to separate out 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:

  • Structs
  • Classes and inheritance
  • Enumerations
  • Projects
  • Extensions
  • Scope
  • Access control
主站蜘蛛池模板: 灵川县| 裕民县| 南宁市| 河东区| 喀喇沁旗| 余江县| 三门峡市| 泗水县| 随州市| 公安县| 永兴县| 盖州市| 大化| 邵阳市| 朝阳市| 嘉禾县| 寻乌县| 富川| 通许县| 新巴尔虎右旗| 新宁县| 新巴尔虎右旗| 兰坪| 铜山县| 隆子县| 浑源县| 昌邑市| 玉屏| 蛟河市| 福州市| 耿马| 霍林郭勒市| 华容县| 修文县| 巴马| 且末县| 托里县| 新巴尔虎左旗| 天柱县| 称多县| 霍城县|