~/talk

Hacking With Swift

Talkat Mobiconf 2018 · 2018-10-04..10-05· [swift, compilers-and-language-design]
slides:none on file

Clones the Swift repo, opens the standard library in a playground and demonstrates six concrete techniques: rethrows used to make functions only throw when their closure throws, precondition to fail early (Swift itself calls it 256 times), staticString to replace forced try for compile-time literals, contiguous arrays and reserveCapacity tradeoffs for performance, and contains(where) composition. Shows real source lines, git checkout to an older tag, grep counts, working playground demos and a custom composition operator that composes functions and prints results.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 3:04Why study Swift standard library
  3. 7:19Boolean operator overloading
  4. 9:28Wreath throws keyword
  5. 10:13Nil coalescing operator
  6. 14:48Assert and precondition functions
  7. 19:35Static string literals
  8. 23:26Custom map implementation
  9. 26:01Contiguous arrays and reserve capacity
  10. 33:09All satisfy method
  11. 36:17Function composition
  12. 44:53Key takeaways and conclusion
~/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.