title: Swift function vs lazy var vs computed property - difference?
body: <p>Is there a difference between following: </p>
  
  <p>Lazy variable: </p>
  
  <pre><code>lazy var profileImageIsLoaded : Bool = {
      return (profileImageView.image != nil) &amp;&amp; (profileImageProgressView.alpha == 0.0)
  }()
  </code></pre>
  
  <p>Function: </p>
  
  <pre><code>func profileImageIsLoaded() -&gt; Bool {
      return (profileImageView.image != nil) &amp;&amp; (profileImageProgressView.alpha == 0.0)
  }
  </code></pre>
  
  <p>Computed Property: </p>
  
  <pre><code>var profileImageIsLoaded : Bool {
      return (profileImageView.image != nil) &amp;&amp; (profileImageProgressView.alpha == 0.0)
  }
  </code></pre>
  
  <p>and what method would be the best to use?</p>
  
  <p>I would call the function/variable multiple times, so my question is also whether lazy vars are "updated" or whether they only get a value one time.</p>