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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Swift

Swift

Photo of interpreter

interpreter

Photo of compiled language

compiled language

Related news:

News photo

Acer's Swift 16 Air laptop weighs less than 2.2 pounds

News photo

NASA mulls sending a rescue rocket to boost Swift observatory's orbit

News photo

Apple developers reject Java, claim big savings from switch to Swift