swift-2.0 编译器是自托管的吗?

Is the swift-2.0 compiler self-hosting?

Swift 2.0 编译器是用什么语言编写的? C++?

自托管 swift 会更强大吗?更理想?

Swift 的编译器 API 与 F# 或 https://github.com/dotnet/roslyn 相比如何?

What language is the swift-2.0 compiler written in? C++?

我们还不能确定它是否完全是用 C++ 编写的,因为 Apple 还没有发布源代码。我们知道它是建立在 LLVM 之上的,所以很大一部分是 C++。可能有些部分是用 Swift 编写的,但 Apple 没有透露任何 Swift/C++ 集成,所以我有点怀疑。

Would a self-hosting swift be more powerful?

不太可能。所有图灵完备语言在输出方面都同样“强大”。有些算法在 X 语言中比在 Y 语言中更容易实现,但是 gcc(用 C 和 C++ 编写)和 clang(用 C++ 编写)已经实现了许多复杂的优化,所以这不是一个强有力的论据。

More desirable?

也许吧。就实现特定目标的方便程度而言,某些语言比其他语言更“强大”。例如,ML 和 Haskell 等语言中的模式匹配支持在编译器实现中非常有用,但我不知道 Swift 的模式匹配是否特别有用。

How does Swift's compiler API compare with F#'s or https://github.com/dotnet/roslyn?

不可能说,因为 Swift 还没有 public 编译器 API。