<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="">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="">&nbsp; case UserInteractive</font></div></div><div class=""><div class=""><font face="Menlo" class="">&nbsp; case UserInitiated</font></div></div><div class=""><div class=""><font face="Menlo" class="">&nbsp; case Default</font></div></div><div class=""><div class=""><font face="Menlo" class="">&nbsp; case Utility</font></div></div><div class=""><div class=""><font face="Menlo" class="">&nbsp; 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="">&nbsp; case userInteractive</font></div><div class=""><font face="Menlo" class="">&nbsp; case userInitiated</font></div><div class=""><font face="Menlo" class="">&nbsp; case `default`</font></div><div class=""><font face="Menlo" class="">&nbsp; case utility</font></div><div class=""><font face="Menlo" class="">&nbsp; 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:&nbsp;</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:&nbsp;</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></body></html>