看了一下其他方面都很不错,但没有继承,光有接口的话,那相同的类属性,是不是都要重复声明?
1
reusFork Jan 2, 2013
不需要,因为有embedded struct
|
2
raspberry Jan 2, 2013
struct有匿名字段可用
|
3
notedit Jan 2, 2013
type A struct {
} type B struct { A } |
4
wildchild Jan 2, 2013
细追究它还没有类呢,呵呵,实现面向对象的不同方式了。
|
5
daweiba Jan 3, 2013
3楼正解
|