Three Rules for Writing Better Swift

from blog TrozWare, | ↗ original
Do not use !. Use let, not var. Allow the compiler to infer types. Read on for more details… 1. Do not use ! # Swift uses optionals for values that can be nil. To use an optional value, you need to “un-wrap” it first, which means getting the actual value out, assuming that the value exists and the optional is not actually nil. Optionals are...