Greg Heo

Getting Under Swift's Skin @ NSMeetup

Three ways to get under Swift's skin: reflection, debug toolchains, and SIL

I gave a talk Getting Under Swift’s Skin at NSMeetup, where I went over three ways to go a bit deeper in working with Swift:

  1. The Swift language itself, lowered to SIL
  2. Looking at the Swift standard library in the debugger and with custom toolchains
  3. Examining runtime instances with reflection

Why would you want to do these things? It can be fun to go below the surface and see how things are made. You can improve your debugging skills and get a greater understanding of the system and runtime for your apps.

Let's go one more level down: wise words from a sometimes wise man

Wise words from a sometimes wise man

As a wise man once said: let’s go one more level down.

The following are some notes and links for more information on things mentioned in the talk.

Swift and SIL

Basic SIL characteristics:

To see the SIL representation of your Swift source:

$ swiftc -emit-sil source.swift

To demangle symbols, run the swift-demangle utility:

$ xcrun swift-demangle

More reading:

Standard Library

More reading:

Reflection

More reading: