title: How properly declare a variable in Swift?
body: <p>I found quite interesting these different ways to declare a variable in Swift:</p>
  
  <pre><code>// METHOD 1
  var dogName: String = "Charlie"
  
  // METHOD 2
  var dogName: String {
      return "Charlie"
  }
  
  // METHOD 3
  let dogName = {
      return "Charlie"
  }
  
  // METHOD 4
  var dogName: String = {
      return "Charlie"
  }()
  </code></pre>
  
  <p>Obviously the method 3 declare a let and we known the difference; but why Swift allows the method 4? </p>
  
  <p><strong>What's the difference between these four methods?</strong></p>
  
  <p>I'm quite confusing in particular between method 2 and 4. In addition why the method 3 lose the final brackets compared to method 4?</p>