<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 8, 2015, at 10:51 AM, Kevin Kachikian via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><font face="Avenir-Book" class="">I’d like to proposal to the Swift community and discuss the advantages and disadvantages of adding modifiable properties to extensions (in addition to the already existing computed properties, instance methods, subscripts, etc.):</font><div class=""><font face="Avenir-Book" class=""><br class=""></font></div><div class=""><font face="Avenir-Book" class="">extension SomeType {</font></div><div class=""><span class="Apple-tab-span" style="white-space:pre"><font face="Avenir-Book" class="">        </font></span></div><div class=""><font face="Avenir-Book" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var aNewProperty: Int</font></div><div class=""><font face="Avenir-Book" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var anotherVariable: String</font></div><div class=""><font face="Avenir-Book" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var aThirdOne: MyStruct</font></div></div></div></blockquote><div><br class=""></div></div>IMO, this is a generally desirable thing. It would be great to replace the need to use objc_setAssociatedObject with proper language support. That said, the exact semantics and implementation details are unclear, so we’d need a specific detailed proposal.<div class=""><br class=""></div><div class="">-Chris</div></body></html>