~/talk

Protocol Witnesses

Talkat App Builders Switzerland 2019 · 2019-04-29..04-30· [swift, ios]
slides:none on file

Argues that every protocol can be replaced by a plain generic struct holding function fields (a protocol witness), demonstrates this by turning a Combineable protocol into a Combining struct with a two-argument combine field so one can have sum and product witnesses for Int concurrently, and shows a pullback operation that derives strategies (image → layer → view → viewController). Rewrites a snapshot-testing library to witnesses (JSON, PNG, GIF, PDF strategies), ships 1.0 after ~2 years in production and reports much simpler composition and new capabilities.

AI-written summary · about

  1. 0:00Intro
  2. 1:00Overview
  3. 2:00Protocols are great
  4. 2:47Protocols have problems
  5. 5:19Protocols have limitations
  6. 6:29Two protocols
  7. 8:00Combined able
  8. 13:01Combined Approach
  9. 14:51Explicit Approach
  10. 15:17Explicit Witnesses
  11. 15:52Combining Witnesses
  12. 18:50Zip
  13. 20:55Combining Functions
  14. 22:45Snapshot Testing
  15. 23:40Screenshot Testing
  16. 26:07Protocol Approach
  17. 26:30Difficult Protocol
  18. 27:18Snapshot Protocol
  19. 27:52Generic Algorithm
  20. 29:56Generic Format
  21. 30:33Explicit Snapshot
  22. 30:48Snapshot Strategies
  23. 31:12Dump Strategy
  24. 31:38Snapshot Strategy
  25. 31:55Snapshot with Curl
  26. 32:13Image Snapshot
  27. 33:10View Controller Hierarchy
  28. 33:35PDFs
  29. 34:20Animation
  30. 36:20Pullback
  31. 37:05Snapshot
  32. 38:22Back
  33. 39:01Recap
  34. 39:41Alternatives
  35. 40:01Pros Cons
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.