~/talk

The underestimated power of KeyPaths

Talkat iOS Conf Singapore 2019 · on Saturday, 2019-01-19· [swift, developer-experience]
slides:none on file

Claims that Swift KeyPaths let code drop verbose closures and become declarative, backed by concrete helpers: implemented generic map/sorted wrappers and a prefix caret operator to convert KeyPath into getters, plus a predicate DSL that compiles to type‑safe NSPredicate‑like filters. Also builds patterns: a builder/identifiable/validator patterns trio that uses KeyPaths for equality, configuration and validation. Examples include sequence extensions, operator overloads and a GitHub repo; runtime behavior works and reported compile/runtime cost is negligible in common cases.

AI-written summary · about

  1. 0:00Start
  2. 3:02How to implement it?
  3. 5:30From KeyPath to getter function
  4. 6:42Defining an operator
  5. 7:40Just build another helper
  6. 12:01Defining Predicates
  7. 12:29Constructing Predicates
  8. 14:04Combining Predicates
  9. 14:44Evaluating Predicates
  10. 15:14That's all you need!
  11. 15:56Switching with Predicates
  12. 17:13Builder Pattern
  13. 20:03Identifiable Pattern
  14. 22:22Validable Pattern
  15. 26:03Recap
  16. 27:44Conclusion
  17. 28:59IOS Conf SG January 2019
~/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.