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

Chapter 4. Abstract and Self Types

Designing and writing high quality code in software engineering is important in order to have applications that are easy to extend and maintain. This activity requires the domain to be well known, correctly understood by a developer, and the requirements for the application to be well defined. If any of these is absent, then writing good programs becomes quite challenging.

Many times, engineers model the "world" using some abstractions. This helps with code extendibility and maintainability and removes duplication, which in many cases could be a reason for bugs. Good code, generally, will consist of multiple small components, which depend on and interact with each other. There are different approaches that help to achieve abstraction and interaction. We will look into the following topics in this chapter:

  • Abstract types
  • Polymorphism
  • Self types

The topics that we will cover here will be really useful when we start looking into some of the concrete design patterns. Understanding them will also help to understand the design patterns that rely on them. Moreover, the concepts covered in this chapter are useful just by themselves for writing good code.

主站蜘蛛池模板: 华池县| 红原县| 比如县| 武平县| 商水县| 樟树市| 石棉县| 琼海市| 安顺市| 大新县| 建阳市| 嵊州市| 镇赉县| 同仁县| 沙坪坝区| 资兴市| 巴青县| 德州市| 乌鲁木齐县| 巧家县| 巩义市| 斗六市| 连平县| 满洲里市| 手游| 云安县| 昌宁县| 乌拉特前旗| 郸城县| 南涧| 来安县| 平江县| 贡觉县| 无极县| 盘山县| 莒南县| 宁德市| 文成县| 冷水江市| 青海省| 克拉玛依市|