Abstract
In OOP languages, an immutable object is an object whose state can’t be modified. Swift calls these constants. Once a constant object has been created and an initial value has been assigned, the object cannot be changed. In contrast, an object whose value can be changed is a mutable object, or the object can be mutated. Swift calls these objects variables.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Waqar Malik
About this chapter
Cite this chapter
Malik, W. (2015). Constants, Variables, and Data Types. In: Learn Swift 2 on the Mac. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1627-9_4
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1627-9_4
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1628-6
Online ISBN: 978-1-4842-1627-9
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)