~/talk

Metaprogramming in Cocoa

links:none on file
slides:none on file

A code-generation tool called Sourcery parses Swift via SourceKit at build time and emits plain Swift so the compiler catches mistakes. Templates (Stencil, Swift, EJS) produce Equatable, Hashable, JSON, lens, test stubs and mocks; annotations in comments let templates skip or fine-tune fields. It integrates as a build phase, supports inline codegen for required initializers, and scales fast — New York Times repo shows one second vs two minutes for generation then full compile.

AI-written summary · about

  1. 0:00Intro
  2. 0:43What is metaprogramming?
  3. 1:21Example of metaprogramming in Ruby
  4. 3:21Why would we want metaprogramming?
  5. 7:38Avoiding human mistakes
  6. 10:29Metaprogramming in Cocoa
  7. 11:12What is available in Swift? Swift reflection
  8. 13:06Will Swift add more powerful features in the future?
  9. 14:19Already in Swift 4
  10. 14:52Problems with metaprogramming
  11. 17:33What is Sourcery?
  12. 18:45Templates?
  13. 23:08Sourcery Features
  14. 24:21How to integrate Sourcery?
  15. 24:37Bundled templates
  16. 26:42Is it going to slow down my builds?
  17. 31:53Summary
~/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.