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

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.

主站蜘蛛池模板: 宁波市| 广河县| 洛阳市| 佛坪县| 仪陇县| 绩溪县| 房产| 贵阳市| 九江县| 武定县| 盐城市| 保靖县| 德令哈市| 来宾市| 板桥市| 蛟河市| 清新县| 阿图什市| 将乐县| 郑州市| 汝南县| 澄江县| 公主岭市| 株洲县| 绵竹市| 清涧县| 泰州市| 辽中县| 尤溪县| 新源县| 丹凤县| 安龙县| 皋兰县| 清新县| 建阳市| 长治县| 精河县| 田东县| 丰镇市| 和政县| 寻乌县|