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

Chapter 2. Building Blocks – Variables, Collections, and Flow Control

One of the coolest things about programming is the way its concepts build on each other. If you've never programmed anything before, even the most basic app can seem very complex. The reality is that if you analyze everything going on in an app down to the ones and zeroes flowing through the processor, it is incredibly complex. However, every aspect of using a computer is an abstraction. When you use an app, the complexity of the programming is abstracted away for you. Learning to program is just a way of going one level deeper to make a computer work for you.

As you learn the basic concepts behind programming, they will become your second nature and this will free your mind to comprehend even more complex concepts. Just as when you first learn to read, sounding out each word is challenging. However, at some point, you reach a level where you glance at a word and you know the meaning instantaneously. This frees you up to start looking for a deeper meaning from the text.

In this chapter, we will build up your knowledge of the building blocks of programming in Swift. Each of these building blocks is an exciting topic on its own and they will become even more exciting as we start to see the possibilities that they open up for us. No matter how complex programming might seem to you now, I guarantee that one day, you will look back and marvel at how all of these concepts have become second nature to you.

In this chapter, we will cover:

  • Core Swift types
  • Swift's type system
  • Printing to the console
  • Controlling the flow of your program
  • A comprehensive example of all the concepts we've covered
主站蜘蛛池模板: 郴州市| 东乡族自治县| 永修县| 苗栗县| 宣武区| 邳州市| 景泰县| 阳东县| 南和县| 祁门县| 工布江达县| 汶川县| 元阳县| 孟州市| 波密县| 中西区| 柏乡县| 峡江县| 孟村| 抚顺市| 准格尔旗| 博罗县| 鹿邑县| 永城市| 革吉县| 东光县| 喀喇沁旗| 平顺县| 长葛市| 墨江| 普格县| 临洮县| 青田县| 北票市| 华坪县| 西吉县| 鄂托克旗| 石阡县| 巴林左旗| 勃利县| 西藏|