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

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.

主站蜘蛛池模板: 马山县| 南京市| 五大连池市| 双牌县| 南皮县| 龙川县| 柳河县| 肥乡县| 太和县| 柏乡县| 浑源县| 潢川县| 临颍县| 邵东县| 德安县| 灵宝市| 盐山县| 兰州市| 日喀则市| 紫阳县| 张掖市| 鲁甸县| 化州市| 蒙山县| 嫩江县| 鄂温| 合川市| 巫山县| 大田县| 广州市| 呼和浩特市| 专栏| 子长县| 泉州市| 洛扎县| 广德县| 明星| 文登市| 轮台县| 汉川市| 大港区|