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

  • Security with Go
  • John Daniel Leon
  • 161字
  • 2021-06-30 19:06:50

Classes

Go technically does not have classes, but there are only a few subtle distinctions that keep it from being called an object-oriented language. Conceptually, I do consider it an object-oriented programming language, though it only supports the most basic features of an object-oriented language. It does not come with all of the features many people have come to associate with object-oriented programming, such as inheritance and polymorphism, which are replaced with other features such as embedded types and interfaces. Perhaps you could call it a microclass system, because it is a minimalistic implementation with none of the extra features or baggage, depending on your perspective.

Throughout this book, the terms object and class may be used to illustrate a point using familiar terms, but be aware that these are not formal terms in Go. A type definition in combination with the functions that operate on that type are like the class, and the object is an instance of a type.

主站蜘蛛池模板: 玉环县| 武夷山市| 铜川市| 三原县| 邵武市| 射洪县| 焉耆| 合肥市| 基隆市| 台中市| 共和县| 永和县| 巍山| 英吉沙县| 慈利县| 罗田县| 罗江县| 沾益县| 长兴县| 徐水县| 长顺县| 滁州市| 丰镇市| 静乐县| 洪泽县| 长沙市| 曲阜市| 民县| 拉萨市| 专栏| 会同县| 客服| 晋州市| 松潘县| 阿图什市| 喜德县| 连南| 鸡东县| 九寨沟县| 中卫市| 秦皇岛市|