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

  • 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.

主站蜘蛛池模板: 高雄市| 无锡市| 孝义市| 淳化县| 大埔区| 靖江市| 武汉市| 泌阳县| 修水县| 四平市| 威宁| 屏南县| 建宁县| 遂川县| 巴塘县| 句容市| 麦盖提县| 承德市| 米泉市| 清丰县| 赤峰市| 台南市| 响水县| 天津市| 嫩江县| 平湖市| 牡丹江市| 慈利县| 丘北县| 汉中市| 陇川县| 宜良县| 大姚县| 石门县| 望都县| 花莲市| 保山市| 萍乡市| 汉源县| 凌海市| 敦煌市|