Peter Chen

  • About
  • iOS
  • ML
  • Design

Gentle Generics - John Sundell, Swift Live 2019

Aug 1, 2019

  • Use generics when you want to generalize and then specialize
  • Use them for an actual demand, not b/c we might need them in an ideal future
  • Don’t overuse them (ex. Contactable protocol instead of simple Contact struct)
  • Should make top-level code at call site simpler, not more complicated

https://www.youtube.com/watch?v=y4qFRLp_JNM

#swift