官术网_书友最值得收藏!

Chapter 1. Exploring Swift

Apple announced Swift at WWDC 2014 as a new programming language that combines experience with the Objective-C platform and advances in dynamic and statically typed languages over the last few decades. Before Swift, most code written for iOS and OS X applications was in Objective-C, a set of object-oriented extensions to the C programming language. Swift aims to build upon patterns and frameworks of Objective-C but with a more modern runtime and automatic memory management. In December 2015, Apple open sourced Swift at https://swift.org and made binaries available for Linux as well as OS X. The content in this chapter can be run on either Linux or OS X, but the remainder of the book is either Xcode-specific or depends on iOS frameworks that are not open source. Developing iOS applications requires Xcode and OS X.

This chapter will present the following topics:

  • How to use the Swift REPL to evaluate Swift code
  • The different types of Swift literals
  • How to use arrays and dictionaries
  • Functions and the different types of function arguments
  • Compiling and running Swift from the command line
主站蜘蛛池模板: 南漳县| 伊宁市| 潮州市| 富阳市| 吉安县| 嘉善县| 安达市| 高邑县| 德令哈市| 南溪县| 商河县| 左云县| 日喀则市| 西和县| 新干县| 固原市| 长泰县| 银川市| 集贤县| 宁陵县| 阿克| 新野县| 水富县| 承德市| 英山县| 太保市| 无棣县| 万山特区| 保定市| 宁都县| 昭通市| 瑞丽市| 达尔| 侯马市| 比如县| 蓝山县| 桂东县| 宜城市| 鹰潭市| 万年县| 绍兴市|