結構不能繼承

與類不同,結構不能繼承:

class MyView: NSView { }  // works

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

但是,結構可以採用協議:

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