<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=""><div class="">Keywords following dots not requiring backticks also seems a valid option.</div><div class=""><br class=""></div>More of a meta-comment:<div class=""> 1. Default was actually a poor name choice for an enumeration case given the meaning of ‘default’ in the language. Some might say this name choice is now being escalated</div><div class=""> 2. Default has always been a restrictive term to have as a keyword, although it is only really required to be considered a keyword in one place</div><div class=""><br class=""></div><div class="">I personally would be fine with switching ‘default’ for ‘else’, as another evolutionator suggested. I don’t remember if this was proposed previously, or if that was only the idea of ‘case _:’, which I’m not really in favor of.</div><div class=""><br class=""></div><div class="">-DW</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 26, 2016, at 1:43 PM, Douglas Gregor 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="">Hi all,<div class=""><br class=""></div><div class="">As part of the grand API guidelines discussion, there was a lot of support for using lowerCamelCase for enum cases, because they are values in Swift. One unfortunate wrinkle here is that it’s not at all uncommon to have a case named “Default” for an enumeration. One example pulled randomly from GitHub:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Menlo" class="">enum DispatchQOS {</font></div></div><div class=""><div class=""><font face="Menlo" class=""> case UserInteractive</font></div></div><div class=""><div class=""><font face="Menlo" class=""> case UserInitiated</font></div></div><div class=""><div class=""><font face="Menlo" class=""> case Default</font></div></div><div class=""><div class=""><font face="Menlo" class=""> case Utility</font></div></div><div class=""><div class=""><font face="Menlo" class=""> case Background</font></div></div><div class=""><div class=""><font face="Menlo" class="">}</font></div></div></blockquote><div class=""><br class=""></div><div class="">If we’re lowerCamelCasting enum cases, this becomes:</div><div class=""><br class=""></div><div class=""><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><div class=""><font face="Menlo" class="">enum DispatchQOS {</font></div><div class=""><font face="Menlo" class=""> case userInteractive</font></div><div class=""><font face="Menlo" class=""> case userInitiated</font></div><div class=""><font face="Menlo" class=""> case `default`</font></div><div class=""><font face="Menlo" class=""> case utility</font></div><div class=""><font face="Menlo" class=""> case background</font></div><div class=""><font face="Menlo" class="">}</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div></blockquote></div><div class="">Note the back-ticks, which are also needed at the call site:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>func dispatch(priority priority: </font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>dispatch(priority: .`default`) { … }</font></div><div class=""><br class=""></div><div class="">We could allow one to refer to keywords without back-ticks following a “.”, similarly to the way we allow keywords without back-ticks preceding a ‘:’ for argument labels, e.g.:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>func dispatch(priority priority: </font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>dispatch(priority: .`default`) { … }</font></div></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">One would still need to use back-ticks in the declaration of the case, but at least uses would be back-tick-free. Thoughts?</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div class=""><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>