Comment Re:Any insight into language design choices? (Score 1) 339
- Why does Swift have both a "var" keyword and a "let" keyword? One should be sufficient with the other being a default behavior. If a symbol is not declared "var" then just assume it is constant or visa versa. Furthermore, it may not be necessary to have either of the key words because (I think) in every case, the need for variability and mutation should be determinable by the compiler. Type is already being inferred by the compiler, and mutability could reasonably be considered an aspect of type.
Well, for one reason, so that you'll catch typeos in variable names at compile time. You have to explicitly declare the symbols you're going to use.