~/talk

Sort Descriptors

Talkat Functional Swift Conference 2016 · 2016-10-01..10-02· [swift]
slides:none on file

Shows how to replace Foundation’s runtime NSSortDescriptor style key‑value sorting with pure Swift: defines a generic sort‑descriptor typealias (A -> A -> Bool), uses localizedCaseInsensitiveCompare for strings, composes multiple descriptors into one comparator so last‑name then first‑name ordering works, and provides a lift optionals helper plus a Comparable‑based generator for numeric fields like year of birth. Result is fully type‑safe, works with structs and avoids KVC/NSObject.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:03Foundation sort descriptors
  3. 3:57Problems with Foundation API
  4. 5:22Swift functional sorting
  5. 9:00Refactoring into descriptors
  6. 12:18Generic sort descriptor
  7. 15:37Handling comparable types
  8. 18:56Combining multiple descriptors
  9. 22:28Sorting optionals and lifting
  10. 25:44Summary and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.