In this chapter, we have developed a great basis for Swift knowledge. We have learned about the various built-in mechanisms Swift has for representing complex information in expressive and accessible ways. We know that, by default, we should declare information as a constant until we find a practical need to change it, and then we should make it a variable. We have explored how every piece of information in Swift has a type associated with it by the compiler, whether it is through type inference or declared explicitly. We are familiar with many of the built-in types, including simple types like String
, Int
, and Bool
as well as containers like tuples, arrays, and dictionaries. We can use the console output to better investigate our programs, especially by using string interpolation for dynamic output. We recognize the power of controlling the flow of our programs with if
statements, conditionals, switches, and loops. We have functions in our skill set to write more legible, maintainable...
You're reading from Learning Swift Second Edition - Second Edition
The rest of the page is locked
You have been reading a chapter from
Learning Swift Second Edition - Second EditionPublished in: Mar 2016Publisher: ISBN-13: 9781785887512
© 2016 Packt Publishing Limited All Rights Reserved