
上QQ阅读APP看本书,新人免费读10天
设备和账号都新为新人

总结
本文从结构体、函数、方法、接口、反射等几个方面深入讨论了Go语言的对象模型。这篇文章的讨论主要是从语法(Syntax)的层面上展开的。我们期待着下次有机会从编译器和运行时的角度来更深入的探讨这个问题。
参考资料:
· https://golang.org/doc/faq#types
· https://golang.org/doc/effective_go.html
· http://spf13.com/post/is-go-object-oriented
· https://www.goinggo.net/2014/05/methods-interfaces-and-embedded-types.html
· https://github.com/tmrts/go-patterns