<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 Jan 11, 2017, at 10:32 AM, Erica Sadun <<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 11, 2017, at 12:26 AM, Chris Lattner 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="">On Jan 10, 2017, at 11:40 AM, Douglas Gregor via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<div 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=""><blockquote type="cite" class=""><div class="">On Jan 10, 2017, at 10:34 AM, Michael Ilseman 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=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">[Forgot to CC swift-evolution the first time]</div><div class=""><br class=""></div><div class=""><div class="">When this came up last, it was seen as more so a bug in the current implementation, rather than an explicit choice. There's no need for a proposal, just a JIRA: <a href="https://bugs.swift.org/browse/SR-115?jql=text%20~%20%22Generic%20subscript%22" class="">https://bugs.swift.org/browse/SR-115?jql=text%20~%20%22Generic%20subscript%22</a> </div></div></div></div></blockquote><div class=""><br class=""></div><div class="">It’s a nontrivial new user-facing feature with new syntax in the language, so it’ll need a proposal. ‘twould be good for the proposal to link to the JIRA ticket.</div><div class=""><br class=""></div><div class="">I’ve only heard positive reactions toward this feature, and it’s something that the standard library could make good use of.</div></div></div></div></blockquote><br class=""></div><div class="">+1, this would be clearly great to happen.</div><div class=""><br class=""></div><div class="">-Chris</div></div></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">I apologize for adding to this topic rather than starting a new one, but I figure people interested in subscripts would be more likely to see my question:</div><div class=""><br class=""></div><div class="">Is there a good reason subscripts cannot throw? Right now you can create a [safe: index] subscript to return an optional but you can't create one that returns an unwrapped value or throws.</div></div></div></blockquote><br class=""></div><div>Throwing subscripts (and properties) do seem to fit well into the language model. There’s a well-written proposal draft by Brent here:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/brentdax/swift-evolution/blob/throwing-properties/proposals/0000-throwing-properties.md" class="">https://github.com/brentdax/swift-evolution/blob/throwing-properties/proposals/0000-throwing-properties.md</a></div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br class=""></div><br class=""></body></html>