the computer how the programmer intends to use that data. — Wikipedia So basically programmers tell the computer their intentions and the computer will complain if the programmer fails to adhere to them.
to it by name. Variables in Swift are defined one of two ways: —var variables whose values can change. —let constants whose values can never change. Swift generally prefers let. If you use var when you don't need it, the compiler will suggest using let instead.
two equivalent lines of code: let array: [String] = ["Ash", "Orta", "Sarah"] ... let array = ["Ash", "Orta", "Sarah"] In either case, Swift needs to disambiguate what is stored in the array.
a value can be nil, or "missing". Optionals are signified by ? and are a type. So Int? is an optional integer because it might be nil. This is another improvement over Objective-C.
clauses so the extension only exists when that clause is true. For example, if we want to extend arrays of things that conform to Occupiable: extension Array where Element: Occupiable { var isFilledWithEmpties: Bool { return self.filter({ $0.isNotEmpty }).count > 0 } }