What causes 'Constant captured by a closure before being initialized' error
<p>In a following class</p>

<pre><code>class Foo {
   let _defaultValue = "N/A"
   let value: String 

   init (dict: NSDictionary) {
       self.value = dict["bar"] as? String! ?? _defaultValue
   }
}
</code></pre>

<p>compiler fails with the message
<code>constant 'self.value' captured by a closure before being initialized</code></p>

<p>As far as I can see, no operators read `self.value. The message seems somewhat confusing.</p>

<p>I accidentally came up with a workaround. I should say it confuses me even more:</p>

<pre><code>class Foo {
       let value: String 

       init (dict: NSDictionary) {
           let _defaultValue = "N/A"
           self.value = dict["bar"] as? String! ?? _defaultValue
       }
    }
</code></pre>

<p>Declaring <code>_defaultValue</code> and initializing it within the constructor makes the code compile.</p>

<p>It'd be an immense help if someone could explain why an error occurs in the first case and what is the compiler happier in the second case?</p>