~/talk

Fun with Type Introspection, Mirroring and Reflection

Talkat Forward Swift 2017 · on Thursday, 2017-03-02· [swift, developer-experience]
links:none on file
slides:none on file

Uses Swift's Mirror struct and protocol extensions to implement a runtime serializer and a Core Data saver for plain structs. Code builds a toJSON implementation (one level deep, notes recursion needed) and a save that maps reflected property names to an NSManagedObject and writes to Core Data. Demo runs in a Playground, prints JSON and then fetches a saved NSManagedObject, proving the save works end-to-end.

AI-written summary · about

  1. 0:00Introduction to reflection
  2. 1:28Using the mirror struct
  3. 3:28Building JSON serializers
  4. 6:50Persistence challenges
  5. 10:14Reflective Core Data saving
  6. 12:31Demonstration and recap
~/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.