~/talk

Property Wrappers or How Swift decided to become Java

Talkat iOS Conf SG 2020 · on Thursday, 2020-01-30· [swift]
slides:none on file

Swift 5.1 property wrappers let code attach compile‑time synthesized behavior to properties and even functions: examples include a clamping wrapper that enforces numeric ranges (initial value checked in init), a user defaults wrapper that removes boilerplate by mapping keys and defaults, and a cached function wrapper that gives a dictionary memoization yielding microsecond vs millisecond speedups. Projected values are exposed with $var, wrapper init uses an initialValue convention, and a proof‑of‑concept GET‑service wrapper works but composition and self‑mutation remain limitations.

AI-written summary · about

  1. 0:00Intro
  2. 1:37Kotlin & Java Annotations
  3. 4:30Clamping Numerical Values
  4. 7:32Compiler Magic
  5. 9:41Data Versioning
  6. 13:43User Defaults
  7. 14:57Functional Programing in Swift
  8. 18:54Caching Pure Functions
  9. 20:12Property Wrappers & Functions
  10. 26:23Recap
~/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.