~/talk

Swift Glue Code

Talkat 360|iDev 2016 · 2016-09-14..09-17· [swift]
links:none on file
slides:none on file

Bottom-up migration strategy: concrete techniques for writing transient glue that maps Swift enums, structs and tuples into Objective C representations so legacy code keeps building. Demonstrates a sample command‑line + framework, uses wrappers and C module maps, shows how to write wrap/unwrap functions for tag unions and tuples, and inspects calling conventions in SIL and LLVM and even assembly. Covers issues that break this approach: Swift 3 beta ABI instability, SE-0058 being deferred, framework size (+~5MB), bitcode/optimization effects and practical workarounds.

AI-written summary · about

  1. 0:00Start
  2. 1:32Our agenda
  3. 2:56Migration Basics
  4. 4:33What is glue code?
  5. 6:31A word of warning
  6. 12:11Preparing for migration (enums)
  7. 13:45Preparing for migration (C imports)
  8. 14:51Preparing for migration (extern consts)
  9. 15:57Preparing for migration (errors)
  10. 16:55Some basic pitfalls
  11. 18:35The @objc annotation
  12. 21:38Builtin-sensitive promotions
  13. 36:19Direct call bridging: Contiguous data types
  14. 37:18Handling function names
  15. 38:33x86_64 assembly to know
  16. 40:05What about optionals?
  17. 40:24C-style bridging: tuples
  18. 42:32A Warning time A
  19. 43:29Handling return optimizations natively
  20. 44:43C-style bridging: structs OOOOO
  21. 45:09Closing remarks
~/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.