by andrewdanks · 12y ago · 0 comments
“If a stored value in your code is not going to change, always declare it as a constant with the let keyword. Use variables only for storing values that need to be able to change.”
Excerpt From: Apple Inc. “The Swift Programming Language.” iBooks. https://itun.es/us/jEUH0.l
1. It gives you additional safety against accidental reassignment.
2. It gives the compiler a major optimization hint since the value is not a variable.