The Swift Programming Language中文版 ----About Swift

Swift是苹果为iOS和OS X应用开发推出的一种新编程语言,它基于C和Objective-C,但摆脱了C兼容性的限制。Swift结合了安全编程模式和现代语言特性,支持无缝接入现有Cocoa框架并与Objective-C代码互操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

昨晚的WWDC14发布了OS X10.10 和iOS8.其他东西就不赘述了。。重点关注了一种新的编程语言--Swift。

由于是昨天才出的新东西,所以在网上只找到了官方的一篇文档。500页的纯英文文档。对于我这种英语水平渣的不能再渣的人来说简直就是噩梦。还好时间很多。自己慢慢啃。总有一天会有英语大神翻译出中文版的。在这只能等了。纠结了半天,还是决定自己先看着,goole娘已经准备好了。慢慢翻译路走起来- -。


全文共分了三部分

Welcome to Swift

Language Guide

Language Reference


首先来看第一部分 -- WelCome to Swift


第一章About Swift大致介绍了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 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). Our framework 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 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 mix-and-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.


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 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 is a fantastic way to write iOS and OS X apps, and will continue to evolve with new features and capabilities. Our goals forSwift are ambitious. We can’t wait to see what you create with it.





译文如下:

Swift 是一种新的编程语言,用于iOS和OS X 的应用程序并且基于C和OC。没有C的兼容性的限制。Swift采用了安全的编程模式,而且增加了一些现代功能,使编程变得更加容易,灵活和有趣。Swift是一种全新的编程语言,由已经成熟的Cocoa 和 Cocoa Touch 框架支持。这是一个重新构想如何开发软件的机会。

Swift 经过了多年的酝酿。apple通过推进我们现有的编译器,调试器和框架的基础设施来奠定了Swift 的基础。我们简化了存储管理和ARC。Foundation和Cocoa为我们打下了坚实的基础。而且我们实现了现代化和标准化。OC语言本身已经进化到了支持块、手机文字和模块,使框架能够一直采用现代语言技术。正是犹豫这个基础,我们才得以在未来使用一种新的语言来进行苹果软件开发。

Swift能够让OC的开发人员感到熟悉。因为它采用了OC的参数命名规则以及OC中的动态对象模型功率。(没太明白。这不重要)它提供了无缝接入现有的Cocoa框架和混合匹配OC代码的相互操作性。(相互兼容的意思么)建立了这个共同点之后,Swift就引入了许多新的特性,统一语言的程序以及面向对象的部分。

Swift对于新的程序员来说是友好的,它是第一个活的工业品质的系统编程语言,它是一种具有表现力同时令人愉快的脚本语言。它支持一个创新的功能,即允许程序员在编写代码时能够立即看到结果,无需build和run。

Swift融合了一流的现代语言与思维以及更广泛的苹果工程师文化的智慧。编译器针对性能进行了优化,语言发展的最优化,无需任何牺牲。它的设计从“Hello World”扩展到整个项目操作。这一切都使得Swift的开发者和苹果有一个健康的未来投资。

Swift是开发iOS和OS X应用程序的一个很好的方式。而且Swift讲继续发展它的新特性和功能。我们的Swift雄心勃勃,所以我们不能等待。来看看你能用它创造什么吧。


===================================================


第一章的内容就是这些,简单介绍了Swift是个什么玩意。闲话不多说。进入下一章。


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值