© Wallace Wang 2017

Wallace Wang, macOS Programming for Absolute Beginners, 10.1007/978-1-4842-2662-9_24

24. Protocol-Oriented Programming

Wallace Wang

(1)San Diego, California, USA

When Apple introduced Swift during its Worldwide Developer's conference in 2014, it was promoted as an easier, safer, and faster programming language for iOS, macOS, tvOS, and watchOS development than Objective-C. While both Swift and Objective-C allow object-oriented programming, Swift goes one step further and offers protocol-oriented programming as well.

One of the biggest problems with pure object-oriented programming languages is that extending the capabilities of a class means creating additional subclasses. Then you have to create objects based on those new subclasses. ...

Get macOS Programming for Absolute Beginners: Developing Apps Using Swift and Xcode now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.