Book Image

iOS 9 Game Development Essentials

By : Chuck Gaffney
Book Image

iOS 9 Game Development Essentials

By: Chuck Gaffney

Overview of this book

Table of Contents (15 chapters)
iOS 9 Game Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

A greater focus on functional programming


As of this publication, the Swift programming language is only a year old but it represents a recent paradigm shift in much of programming. Object-oriented programming and design still holds true, but a shift to functional programming is where languages such as Scala and Swift place their focus. Functional programming, in summary, is a focus on functions being pure mathematical calculations of objects with an avoidance of the state changes and mutable data that we've seen with past languages, such as C++/Java and even Apple's own Objective-C. Instead of dealing with subroutines, a function only works on the parameters it's given. Swift does this well with its closures, which we've seen a few times in this book, and are often used to compact much of the logic in game programming for iOS.

Since WWDC14, Apple has told developers that Swift is the successor to both C and Objective-C. It's a completely rebuilt language from the ground up with speed and...