Save 37% off PRO during our Black Friday Sale! »

Introducing Swift 5's Property Wrappers

5451f7df31d36d0159a018706aec7adb?s=47 Erica Sadun
February 03, 2020

Introducing Swift 5's Property Wrappers

A brand new feature waiting for adoption

5451f7df31d36d0159a018706aec7adb?s=128

Erica Sadun

February 03, 2020
Tweet

Transcript

  1. Property Wrappers erica sadun 1

  2. Language-like but not Language 2

  3. Language-like but not Language 3

  4. Operators 4

  5. 5

  6. 6

  7. Trailing closures 7

  8. None
  9. None
  10. SwiftUI 10

  11. None
  12. None
  13. None
  14. Property Wrappers: History 14

  15. Property Wrappers: History 15

  16. Property Wrappers: History 16

  17. None
  18. 18

  19. None
  20. My First Property Wrapper 20

  21. String Trimming 21

  22. 22

  23. None
  24. Mandate your behavior contracts at the point of declaration, not

    the point of use 24
  25. 25 Mandate your behavior contracts at the point of declaration,

    not the point of use
  26. None
  27. None
  28. None
  29. ‣ Simple ‣ Readable ‣ Positioned at the point of

    declaration ‣ Documention-friendly
  30. Uses ‣ Thread safety ‣ Barriers ‣ Syncing with stores

    / web services ‣ Validation on assignment ‣ Data configuration ‣ etc 30
  31. Property Wrappers: Tastes like core language. Less filling. Fewer calories.

    31
  32. Property Wrappers erica sadun 32