I\'ve read this simple explanation in the guide:
The value of a constant doesn’t need to be known at compile time, but you must assign it a value exa
Swift properties:
Swift Properties official documentation
In its simplest form, a stored property is a constant or variable that is stored as part of an instance of a particular class or structure. Stored properties can be either variable stored properties (introduced by the
varkeyword) or constant stored properties (introduced by theletkeyword).
Example:
The example below defines a structure called FixedLengthRange, which describes a range of integers whose range length cannot be changed once it is created:
struct FixedLengthRange {
var firstValue: Int
let length: Int
}
Instances of
FixedLengthRangehave a variable stored property calledfirstValueand a constant stored property calledlength. In the example above,lengthis initialized when the new range is created and cannot be changed thereafter, because it is a constant property.