Summary

This chapter has covered a lot of ground. You can see that Swift isn’t another version of Objective-C. Swift is a mixture of principles from a lot of languages, and it really is the best of many languages. It has ranges, which pull syntax straight out of Ruby. It has for in loops with enumerate and tuples, which both are straight out of Python. It has regular for loops with i++ or ++i, which come from C and many other languages. It also has optionals, which are Swift’s own invention.

You’ll see shortly that Swift has a lot of cool features that make it easy to use along with your Objective-C and C code. You have already gotten a small taste of arrays. Chapter 2, “Collecting Data,” covers arrays and dictionaries in detail. You’ll see ...

Get Learning Swift™ Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.