Constructing Classes, Structures, and Enumerations

  • Scott Gardner
Chapter

Abstract

As alluded to in previous chapters, and revealed fully in this one, Swift breaks new ground with class types, and upgrades structures and enumerations to first-class status. In fact, there is less to say about the differences than similarities between classes and structures in Swift, and enumerations are not far off the mark, either. This chapter will introduce each of these constructs, first at a high level and then followed by deeper analysis of major considerations such as initialization, definition of properties and methods, and selection guidelines.

Keywords

Class Instance Failable Initializer Reference Type Instance Property Instance Method 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Scott Gardner 2014

Authors and Affiliations

  • Scott Gardner
    • 1
  1. 1.NYUS

Personalised recommendations