The terms "declaration" and "definition" are used synonymously in the Apple Swift documentation, and this confuses me.
In the Initialization section (which talks about class initializers), Apple states:
You can set the initial value for the stored property in the initializer or assign a default property value as part of the property definition .
Further in the subsection they indicate:
You can set the initial value of the saved property from the initializer, as shown above. Alternatively, specify the default property value as part of the Ad properties .
I thought the declaration of a variable was different from the definition of a variable.
source
share