Get the latest tech news
How we built an interpreter for Swift
Build apps for your phone, on your phone.
We can easily take some Swift code and get a parsed tree out of it, which we can use to evaluate and call into to get dynamic runtime values. We don’t want to rewrite all of the APIs, the whole benefit of making a native app is being able to call into those implementations! To do this, we can make stub types that conform to the protocol, but instead of having any logic of their own, simply call out to the interpreter to implement any requirements.
Or read this on Hacker News