associatedtype 和 typealias 在 Swift 中都可以用来为类型起别名,但是它们之间有一些重要的区别。 typealias 可以为已知类型起别名,例如: typealias MyString= String