© Radoslava Leseva Adams and Hristo Lesev 2016

Radoslava Leseva Adams and Hristo Lesev, Migrating to Swift from Flash and ActionScript, 10.1007/978-1-4842-1666-8_21

21. Object-Oriented Programming Topics

Radoslava Leseva Adams and Hristo Lesev2

(1)London, UK

(2)Kazanlak, Bulgaria

In this chapter we will go over the object-oriented side of Swift. Having experience with ActionScript, you are already familiar with the object-oriented programming (OOP) paradigm. It treats a piece of software as a system, which is broken down into objects. Each object is responsible for a part of the system and looks after its own state.

Swift uses four main OOP entities:

  • Classes

  • Structures

  • Enumerations

  • Protocols

Each of these entities defines a type (classes, structures, ...

Get Migrating to Swift from Flash and ActionScript 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.