Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Inheritance Curse

Bb677c2e3102fccab50f4db002d79e72?s=47 greg3z
January 27, 2017

The Inheritance Curse

In the Objective-C Kingdom, the evil Queen NSObject was reigning over her people by keeping them under the control of the inheritance chains. But one day, a swift wizard named Christobald came to create a kingdom next to the Queen’s.
Of course, she was not going to let that happen. She managed to infect partially the wizard with the inheritance curse.
The war between the two kingdoms was ongoing for several years when the wizard suddenly left. It is now our duty to continue the fight!

Bb677c2e3102fccab50f4db002d79e72?s=128

greg3z

January 27, 2017
Tweet

Transcript

  1. The Inheritance Curse

  2. None
  3. None
  4. NSObject

  5. None
  6. isEqual: conformsToProtocol: hash isKindOfClass:

  7. code reuse

  8. code reuse through inheritance

  9. code reuse* through inheritance from

  10. None
  11. UIResponder

  12. UIResponder UIView

  13. UIResponder UIView UIControl

  14. UIResponder UIView UIControl UIButton

  15. UIResponder UIView UIControl UIButton MyButton

  16. UIResponder UIView UIControl UIButton MyButton …

  17. None
  18. None
  19. class struct enum

  20. None
  21. class struct enum

  22. class struct enum

  23. None
  24. None
  25. Bye bye! Sans les mains!

  26. None
  27. UIKit

  28. UIKit Reference type

  29. UIKit Reference type Code reuse

  30. UIKit

  31. final UIKit

  32. Reference type

  33. final Reference type

  34. Code reuse

  35. composition generics protocol extensions Code reuse

  36. TL;DL

  37. TL;DL final class

  38. TL;DL final class || class

  39. None
  40. @greg3z