Type information in a type property
<p>I'm trying to create a type property whose value depends on the class name.  I'd like to write something like this so the property will be computed only once per type:</p>

<pre><code>// Doesn't work
static var modifiedClassName: String = {
    let s = type(of: self)
    return String(describing: s).modified()
}()
</code></pre>

<p>However that doesn't work because <code>self</code> is not available within the closure.  The closest I've come is</p>

<pre><code>// Works
static var modifiedClassName: String {
    let s = type(of: self)
    return String(describing: s).modified()
}
</code></pre>

<p>But this property is computed each time it's called and is not what I'm after.</p>

<p>Is there a way to access type information inside a closure defining a type property?</p>