<div dir="ltr">I don't follow. What's a singleton/how? If you mean my example, the whole point/need for the feature is so it's not. I want `.value` to be unique storage for each subclass.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 9, 2017 at 7:09 PM, Robert Widmann <span dir="ltr"><<a href="mailto:rwidmann@apple.com" target="_blank">rwidmann@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is a singleton, it just happens to be in class scope.<br>
<span class="HOEnZb"><font color="#888888"><br>
~Robert Widmann<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Aug 9, 2017, at 3:55 AM, Mathew Huusko V via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
><br>
> Curious if class stored properties have ever been discussed (doesn't seem so..)?<br>
><br>
> Also, assuming no, and assuming there's a good reason no/they're not coming anytime soon, what are some patterns people have been using in their place? I was considering something like..<br>
><br>
> class SomeClass {<br>
> private static var _classValues = [SomeClass.Type: Int]()<br>
><br>
> class var value: Int {<br>
> get { _classValues[self] }<br>
> set { _classValues[self] = newValue }<br>
> }<br>
> }<br>
><br>
> .. but then I remembered types aren't hashable yet either (so I guess I need to stringify it first).<br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> swift-evolution mailing list<br>
> <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br>
</div></div></blockquote></div><br></div>