Chapter 5. Organizing with Classes and Structures

Swift is an object-oriented language, and as such, it is apropos to devote some considerable real estate to the subject. If you are familiar with other object-oriented languages such as Objective-C and C++, the concepts presented here will be very familiar to you. If you are new to the idea of object-oriented programming, don’t be alarmed. I’ll take you through a tour of the concepts to prepare you for Swift’s flavor of OOP (that’s the common acronym for object-oriented programming, by the way, and I’ll be using it throughout the chapter).

No matter what your current familiarity is with OOP concepts, preparing yourself with a new playground file in Xcode 6 is a good idea. Choose File > New > Playground ...

Get Swift for Beginners: Develop and Design 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.