Swift是否提供像Javascript一样评估Swift代码的能力?
问题描述:
Swift是否提供了像Javascript一样评估Swift代码的能力?我想创建一个可以运行Swift代码的应用程序。
Does Swift provides the ability to eval Swift code like Javascript does? I would like to create an app that can run Swift code.
答
不,它没有。有一个通过REPL暴露的Swift JIT,但它(目前至少)不打算用于应用程序。
No, it doesn't. There is a Swift JIT exposed via the REPL, but it's not (currently at least) intended for use in applications.