Skip to content

Instantly share code, notes, and snippets.

@pofat
Created August 6, 2019 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pofat/61a4f4a8b263f442fc8c8cc60ab44c42 to your computer and use it in GitHub Desktop.
Save pofat/61a4f4a8b263f442fc8c8cc60ab44c42 to your computer and use it in GitHub Desktop.
兩種宣告方式之間有什麼差異?
// 會帶真實型別進去
func doSomething<T: MyPotocol>(_ arg: T) { }
// 有 existentail container
func doSomething(_ arg: MyProtofcol) { }
@Sheng-Zhang
Copy link

existential?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment