<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 7, 2015, at 5:09 PM, Ling Wang <<a href="mailto:an00na@gmail.com" class="">an00na@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline">Class stored properties VS. static stored properties<br class=""></blockquote><br class=""><br class="">You list many complaints about class properties, then go on to suggest that we replace “class” with “type”. It seems that your complaints aren’t actually relevant to the proposal, since you’re not actually removing them from the model. In fact, instead of “static var x” you’d have to write “final type var x”, which would be an unfortunate regression.<br class=""></div></div></blockquote><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">When you said "You list many complaints about class properties” you meant “class stored properties”, right?</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">If so I don’t think I’ve ever complained about it because Swift doesn’t support class stored properties yet. My points about class stored properties are:</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">1. Are they useful enough? Do we want it in Swift?</div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">2. Are we going to add it in Swift? If yes, when?</div></div></div></div></blockquote><div><div class=""><br class=""></div></div>Perhaps, but they are very low priority. </div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">3. If no, then we only have one kind of type stored properties, why do we need two keywords for them?</div></div></div></div></blockquote><div><br class=""></div><div>You’re missing what I’m trying to say. With your design:</div></div><div><br class=""></div><div>class Foo {</div><div> type var x : Int</div><div>}</div><div><br class=""></div><div>This would be a stored class property, which isn’t supported and won’t be for the forseeable. This would require people to write:</div><div><br class=""></div><div><div>class Foo {</div><div> final type var x : Int</div><div>}</div><div class=""><br class=""></div><div class="">This is a lot worse than:</div><div class=""><br class=""></div><div class=""><div>class Foo {</div><div> static var x : Int</div><div>}</div></div><div class=""><br class=""></div><div class="">... both in terms of boilerplate noise, but also in that it leads them down the wrong path. Many people would write “type var x : Int” wanting a static member, because they don’t understand how class variables work.</div><div class=""><br class=""></div><div class="">Your approach would make class members *more* prominent, not less. We’ve tried this, this is not a theoretical concern.</div><div class=""><br class=""></div><div class="">-Chris</div></div></body></html>