有的时候,认为看英文文档有些费时,看中文文档怕翻译不准,有些地方确实不须要抠字眼。当有些地方假设翻译不精准会产生歧义,所以用这样对比的方式。顺便学习一下Swift。

Swift is a new programming language for iOS and OS X apps that builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun. Swift’s clean slate, backed by the mature and much-loved Cocoa and Cocoa Touch frameworks, is an opportunity to reimagine how software development works.

Swift 是一种全新的编程语言,用于编写 iOS 和 OS X 应用。Swift 结合了 C 和 Objective-C 的长处,并且没有C兼容性的限制。Swift 採用安全的编程模式并加入了非常多新特性,这将使编程更简单,更灵活,也更有趣。

Swift 是基于成熟并且受欢迎的 Cocoa 和 Cocoa Touch 框架,试一次又一次构想软件开发的全新革命。

Swift has been years in the making. Apple laid the foundation for Swift by advancing our existing compiler, debugger,and framework infrastructure. We simplified memory management with Automatic Reference Counting (ARC). Ourframework stack, built on the solid base of Foundation and Cocoa, has been modernized and standardized throughout. Objective-C itself has evolved to support blocks, collection literals, and modules, enabling framework adoption of modern language technologies without disruption. Thanks to this groundwork, we can now introduce a new language for the future of Apple software development.

Swift的开发酝酿非常久。为了给 Swift 提供支持。苹果公司改进了编译器,调试器和框架结构。我们使用自己主动引用计数(Automatic Reference Counting, ARC)来简化内存管理。我们在 Foundation 和 Cocoa的基础上构建框架栈并将其标准化。Objective-C 本身支持块、集合语法和模块。所以框架能够轻松支持现代编程语言技术。正是得益于这些基础工作。我们如今才干公布这样一个用于未来苹果软件开发的新语言。

Swift feels familiar to Objective-C developers. It adopts the readability of Objective-C’s named parameters and the power of Objective-C’s dynamic object model. It provides seamless access to existing Cocoa frameworks and mixand-match interoperability with Objective-C code. Building from this common ground, Swift introduces many new features and unifies the procedural and object-oriented portions of the language.

Objective-C 开发人员对 Swift 并不会感到陌生。它採用了 Objective-C 的命名參数以及动态对象模型,能够无缝对接到现有的 Cocoa 框架,而且能够兼容 Objective-C 代码。在此基础之上。Swift 还有很多新特性而且支持过程式编程和面向对象编程。

Swift is friendly to new programmers. It is the first industrial-quality systems programming language that is as expressive and enjoyable as a scripting language. It supports playgrounds, an innovative feature that allows programmers to experiment with Swift code and see the results immediately, without the overhead of building and running an app.

Swift 对于刚開始学习的人来说也非常友好。它是第一个既满足工业标准又像脚本语言一样充满表现力和趣味的编程语言。

它支持代码预览。这个革命性的特性能够同意程序猿在不编译和执行应用程序的前提下执行 Swift 代码并实时查看结果。

Swift combines the best in modern language thinking with wisdom from the wider Apple engineering culture. The compiler is optimized for performance, and the language is optimized for development, without compromising on either. It’s designed to scale from “hello, world” to an entire operating system. All this makes Swift a sound future investment for developers and for Apple.

Swift 将现代编程语言的精华和苹果project师文化的智慧结合了起来。

编译器对性能进行了优化。编程语言对开发进行了优化,两者互不干扰,鱼与熊掌兼得。Swift 即能够用于开发“hello, world”这种小程序,也能够用于开发一套完整的操作系统。

全部的这些特性让 Swift 对于开发人员和苹果来说都是一项值得的投资。

Swift is a fantastic way to write iOS and OS X apps, and will continue to evolve with new features and capabilities. Our goals for Swift are ambitious. We can’t wait to see what you create with it.

用 Swift 编写 iOS 和 OS X 应用将是一个出色的体验,Swift 之后也会不断开发新特性和兼容性。我们对 Swift 充满信心,已经迫不及待的想要看到Swift开发出的应用。