Files
the-swift-programming-langu…/swift/swift.html
2014-06-03 14:50:08 +08:00

249 lines
9.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML>
<html lang="en-US" manifest="../manifest.appcache">
<head prefix="og: http://ogp.me/ns# book: http://ogp.me/ns/book#">
<meta charset="UTF-8">
<title>关于Swift | Swift编程语言</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="robots" content="index, follow">
<meta name="author" content="">
<meta name="description" content="Swift是苹果在WWDC2014上发布的一款全新的编程语言本书译自苹果官方的Swift教程《The Swift Programming Language》。">
<meta name="keywords" content="gitbook,github" >
<meta name="generator" content="www.gitbook.io">
<link rel="next" href="../a_swift_tour.html" />
<link rel="prev" href="../swift/README.html" />
<meta property="og:title" content="关于Swift | Swift编程语言">
<meta property="og:site_name" content="Swift编程语言">
<meta property="og:type" content="book">
<meta property="og:locale" content="en_US">
<meta property="book:author" content="https://github.com/">
<meta property="book:tag" content="GitBook">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
</head>
<body>
<link rel="stylesheet" href="../gitbook/style.css">
<div class="book" data-level="1.1" data-basepath=".." data-revision="1401778152409">
<div class="book-header">
<!-- Actions Left -->
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
<a href="https://github.com/null" target="_blank" class="btn pull-left home-bookmark" aria-label="GitHub home"><i class="fa fa-bookmark-o"></i></a>
<a href="#" class="btn pull-left toggle-search" aria-label="Toggle search"><i class="fa fa-search"></i></a>
<span id="font-settings-wrapper">
<a href="#" class="btn pull-left toggle-font-settings" aria-label="Toggle font settings"><i class="fa fa-font"></i>
</a>
<div class="dropdown-menu font-settings">
<div class="dropdown-caret">
<span class="caret-outer"></span>
<span class="caret-inner"></span>
</div>
<div class="btn-group btn-block">
<button id="reduce-font-size" class="btn btn-default">A</button>
<button id="enlarge-font-size" class="btn btn-default">A</button>
</div>
<ul class="list-group font-family-list">
<li class="list-group-item" data-font="0">Serif</li>
<li class="list-group-item" data-font="1">Sans</li>
</ul>
<div class="btn-group btn-group-xs btn-block color-theme-list">
<button type="button" class="btn btn-default" id="color-theme-preview-0" data-theme="0">White</button>
<button type="button" class="btn btn-default" id="color-theme-preview-1" data-theme="1">Sepia</button>
<button type="button" class="btn btn-default" id="color-theme-preview-2" data-theme="2">Night</button>
</div>
</div>
</span>
<!-- Actions Right -->
<a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Share on Google Plus"><i class="fa fa-google-plus"></i></a>
<a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Share on Facebook"><i class="fa fa-facebook"></i></a>
<a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Share on Twitter"><i class="fa fa-twitter"></i></a>
<!-- Title -->
<h1>
<i class="fa fa-spinner fa-spin"></i>
<a href="../" >Swift编程语言</a>
</h1>
</div>
<div class="book-summary">
<div class="book-search">
<input type="text" placeholder="Search" class="form-control" />
</div>
<ul class="summary">
<li data-level="0" data-path="index.html">
<a href="../"><i class="fa fa-check"></i> Introduction</a>
</li>
<li class="chapter " data-level="1" data-path="swift/README.html">
<a href="../swift/README.html">
<i class="fa fa-check"></i> <b>1.</b> 欢迎使用Swift
</a>
<ul class="articles">
<li class="chapter " data-level="1.1" data-path="swift/swift.html">
<a href="../swift/swift.html">
<i class="fa fa-check"></i> <b>1.1.</b> 关于Swift
</a>
</li>
<li class="chapter " data-level="1.2" data-path="a_swift_tour.html">
<a href="../a_swift_tour.html">
<i class="fa fa-check"></i> <b>1.2.</b> Swift初见
</a>
</li>
</ul>
</li>
<li class="divider"></li>
<li>
<a href="http://www.gitbook.io/" target="blank" class="gitbook-link">Generated using GitBook</a>
</li>
</ul>
</div>
<div class="book-body">
<div class="body-inner">
<div class="page-wrapper" tabindex="-1">
<div class="book-progress">
<div class="bar">
<div class="inner" style="width: 66.66666666666667%;min-width: 33.333333333333336%;"></div>
</div>
<div class="chapters">
<a href="../index.html" title="Introduction" class="chapter done new-chapter" data-progress="0" style="left: 0%;"></a>
<a href="../swift/README.html" title="欢迎使用Swift" class="chapter done new-chapter" data-progress="1" style="left: 33.333333333333336%;"></a>
<a href="../swift/swift.html" title="关于Swift" class="chapter done " data-progress="1.1" style="left: 66.66666666666667%;"></a>
<a href="../a_swift_tour.html" title="Swift初见" class="chapter " data-progress="1.2" style="left: 100%;"></a>
</div>
</div>
<div class="page-inner">
<section class="normal" id="section-gitbook_217">
<h1 id="-swift">关于Swift</h1>
<p>Swift是一种新的编程语言用于编写iOS和OS X应用程序。Swift结合了C和Objective-C的优点并且不受C的兼容性的限制。Swift使用安全的编程模式并添加了很多新特性这将使编程更简单扩展性更强也更有趣。除此之外Swift还支持人见人爱的Cocoa和Cocoa Touch框架。拥有了这些特性Swift将重新定义软件开发。</p>
<p>Swift的开发从很久之前就开始了。为了给Swift打好基础苹果公司改进了编译器调试器和框架结构。我们使用自动引用计数Automatic Reference Counting, ARC来简化内存管理。我们在Foundation和Cocoa的基础上构建框架栈并将其标准化。Objective-C本身支持块、集合语法和模块所以框架可以轻松支持现代编程语言技术。得益于这些基础工作我们现在可以发布一个新语言用于未来的苹果软件的开发。</p>
<p>Objective-C开发者对于Swift并不会感到陌生。它采用了Objective-C的命名参数以及动态对象模型可以无缝对接到现有的Cocoa框架并且可以兼容Objective-C代码。在此基础之上Swift还有许多新特性并且支持过程式编程和面向对象编程。</p>
<p>Swift对于初学者来说也很友好。它是第一个既满足工业标准又像脚本语言一样充满表现力和趣味的编程语言。它支持代码预览这个革命性的特性可以允许程序员在不编译和运行应用程序的前提下运行Swift代码并实时查看结果。</p>
<p>Swift将现代编程语言的精华和苹果工程师文化的智慧结合了起来。编译器对性能进行了优化编程语言对开发进行了优化两者互不干扰鱼与熊掌兼得。Swift即可以用于开发“hello, world”这样的小程序也可以用于开发一个完整的操作系统。所有的这些特性让Swift对于开发者和苹果来说都是一项值得的投资。</p>
<p>用Swift编写iOS和OS X应用将是一场美妙的体验Swift之后也会不断开发新特性和兼容性。我们对Swift充满信心你还在等什么</p>
</section>
</div>
</div>
</div>
<a href="../swift/README.html" class="navigation navigation-prev " aria-label="Previous page: 欢迎使用Swift"><i class="fa fa-angle-left"></i></a>
<a href="../a_swift_tour.html" class="navigation navigation-next " aria-label="Next page: Swift初见"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/ace.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/mode-javascript.js"></script>
<script src="../gitbook/jsrepl/jsrepl.js" id="jsrepl-script"></script>
<script src="../gitbook/app.js"></script>
<script src="../gitbook/plugins/gitbook-plugin-mixpanel/plugin.js"></script>
<script src="http://cdn.mathjax.org/mathjax/2.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="../gitbook/plugins/gitbook-plugin-mathjax/plugin.js"></script>
<script>
require(["gitbook"], function(gitbook) {
var config = {};
gitbook.start(config);
});
</script>
</body>
</html>