title: What is the difference between `let` and `var` in Swift?
body: <p>What is the difference between <code>let</code> and <code>var</code> in Apple's Swift language?</p>
  <p>In my understanding, it is a compiled language but it does not check the type at compile time. It makes me confused. How does the compiler know about the type error? If the compiler doesn't check the type, isn't it a problem with production environment?</p>
  <p>This error is given when I try to assign a value to a <code>let</code>:</p>
  <blockquote>
  <p>Cannot assign to property: 'variableName' is a 'let' constant<br />
  Change 'let' to 'var' to make it mutable</p>
  </blockquote>