结构不能继承

与类不同,结构不能继承:

class MyView: NSView { }  // works

struct MyInt: Int { } // error: inheritance from non-protocol type 'Int'

但是,结构可以采用协议:

struct Vector: Hashable { ... }  // works