<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="">I never quite understood why ObjC never implemented such a capability as it seems really useful.<div class=""><br class=""></div><div class="">I will have to defer the details however to someone else in the community as defining the semantics and implementation details are currently above my pay grade. {:~)</div><div class=""><br class=""></div><div class="">-Kevin</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 8, 2015, at 9:21 PM, Chris Lattner &lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt; 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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 8, 2015, at 10:51 AM, Kevin Kachikian via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; 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,&nbsp;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 class=""><br class=""></div></div>IMO, this is a generally desirable thing. &nbsp;It would be great to replace the need to use&nbsp;objc_setAssociatedObject with proper language support. &nbsp;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></div></div></blockquote></div><br class=""></div></body></html>