As we stated before, Swift is a type-safe language. Apple also created Swift with the intention of keeping as many potential errors and bugs in the compilation state of development as opposed to runtime. Though Xcode has some great debugging tools, from the use of breaks, logging, and the LLDB debugger, runtime errors, particularly in games can be tough to spot, thus bringing the development process to a halt. To keep everything type-safe and as bug-free as possible during compilation, Swift deals with the concept of optionals.
Optionals, in short, are objects that potentially can be or start as nil. Nil, of course, is an object that has no reference.
In Objective-C, we could declare the following string variable for a game:
NSString *playerStatus ...