<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 May 16, 2016, at 1:59 PM, Brandon Knope &lt;<a href="mailto:bknope@me.com" class="">bknope@me.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="">Do you have a link to your proposal?</div></div></blockquote><div><br class=""></div><div>The part relevant to this thread is in the section “Interactions with other features”</div><div><br class=""></div><div><a href="https://github.com/anandabits/swift-evolution/blob/partial-initializers/proposals/NNNN-partial-initializers.md" class="">https://github.com/anandabits/swift-evolution/blob/partial-initializers/proposals/NNNN-partial-initializers.md</a></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Brandon</div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div class="">On May 16, 2016, at 2:58 PM, Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" class="">matthew@anandabits.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class=""><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class=""><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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; float: none; display: inline !important;" class="">Sent from my iPad</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class=""><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class="">On May 16, 2016, at 12:33 PM, Michael Peternell via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">Why not just use a (documentation) comment?<br class=""><br class="">/// The Lifecycle extension:<br class="">extension ViewController {<br class=""></blockquote><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class=""><span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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; float: none; display: inline !important;" class="">There have been discussions about possibly allowing extensions to have stored properties in the future. &nbsp;If that comes to pass it may well be useful for extensions to have a name that can be used to refer to the extension during initialization. &nbsp;I discussed possible syntax for that in my draft proposal for partial initializers (which I tabled for Swift 3, but may revive in the future).</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class=""><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class=""><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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;" class="">...<br class=""><br class="">-Michael<br class=""><br class=""><blockquote type="cite" class="">Am 16.05.2016 um 18:26 schrieb Brandon Knope via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt;:<br class=""><br class="">I like to separate methods into their own logical extensions so similar methods are grouped together. I do this mostly with Cocoa Touch where I like all view life cycle methods to be in the same extension:<br class=""><br class="">extension ViewController {<br class="">&nbsp;&nbsp;override func viewDidLoad() {<br class="">&nbsp;&nbsp;}<br class=""><br class="">&nbsp;&nbsp;override func viewWillAppear(animated: Bool) {<br class="">&nbsp;&nbsp;}<br class=""><br class="">&nbsp;&nbsp;override func viewDidDisappear(animated: Bool) {<br class="">&nbsp;&nbsp;}<br class="">}<br class=""><br class="">You can document this somewhat by adding a MARK comment:<br class=""><br class="">// MARK: Lifecylce<br class="">extension ViewController {<br class="">&nbsp;&nbsp;override func viewDidLoad() {<br class="">&nbsp;&nbsp;}<br class=""><br class="">&nbsp;&nbsp;override func viewWillAppear(animated: Bool) {<br class="">&nbsp;&nbsp;}<br class=""><br class="">&nbsp;&nbsp;override func viewDidDisappear(animated: Bool) {<br class="">&nbsp;&nbsp;}<br class="">}<br class=""><br class="">What if we made this more self-documenting by elevating this to a language feature?<br class=""><br class="">extension ViewController named Lifecycle {<br class="">&nbsp;&nbsp;override func viewDidLoad() {<br class="">&nbsp;&nbsp;}<br class=""><br class="">&nbsp;&nbsp;override func viewWillAppear(animated: Bool) {<br class="">&nbsp;&nbsp;}<br class=""><br class="">&nbsp;&nbsp;override func viewDidDisappear(animated: Bool) {<br class="">&nbsp;&nbsp;}<br class="">}<br class=""><br class="">Other ways:<br class="">extension named Lifecycle ViewController { }<br class="">extension named “View Lifecycle" ViewController { }<br class="">extension ViewController named “Multi word description” { }<br class=""><br class=""><br class="">For now, this is purely a documenting feature (i.e. Can’t refer to the extension name dynamically or statically in actual code). I think it plays much more naturally with Swift than requiring this to be in the comments and would work across all IDEs and make it easier for people to find a specific extension as well as making their code more self documenting.<br class=""><br class="">Any thoughts?<br class=""><br class="">Thanks,<br class="">Brandon<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></blockquote><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></blockquote></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></body></html>