<div dir="ltr">I think it makes sense for enum cases to be UpperCamelCase as they can be thought of as scoped types (singleton types in the case of cases with no associated types).<div><br></div><div>Option set elements, on the other hand, I think really are values so it may make sense for those to be lowerCamelCase.<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 23, 2016 at 1:11 PM, Joe Groff via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span><br><div><blockquote type="cite"><div>On Jan 23, 2016, at 2:12 AM, Marc Knaup via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br><div><div dir="ltr">What is the rationale behind naming enumeration cases in upper camel case?<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><strong style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,Verdana,sans-serif;line-height:27px">Follow case conventions:</strong><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,Verdana,sans-serif;line-height:27px"> </span><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,Verdana,sans-serif;line-height:27px">names of types, protocols and enum cases are</span><code style="line-height:27px;white-space:nowrap;font-family:Menlo,Consolas,Monaco,'Courier New',monospace,serif;padding:3px 8px;border:1px solid rgb(229,229,229);background-color:rgb(247,247,247)">UpperCamelCase</code><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,Verdana,sans-serif;line-height:27px">. Everything else is</span><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,Verdana,sans-serif;line-height:27px"> </span><code style="line-height:27px;white-space:nowrap;font-family:Menlo,Consolas,Monaco,'Courier New',monospace,serif;padding:3px 8px;border:1px solid rgb(229,229,229);background-color:rgb(247,247,247)">lowerCamelCase</code><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,Verdana,sans-serif;line-height:27px">.</span></blockquote></blockquote><div><br></div><div><font face="monospace, monospace">let a = NSComparisonResult.OrderedSame // refers to a value, but is upper-case</font></div><div><font face="monospace, monospace">let b = NSDate.distantFuture // refers to a property/value, but is lower-case</font></div><div><ul><li>everything related to types (type names, protocol names, generic type parameter names) should be upper camel case</li><li>everything else (function names, property names, variable names, etc.) should be lower camel case<br></li></ul></div><div>This is already the current and the proposed recommendation with enumeration cases being the only exception.</div><div>Enumeration cases are not types.</div></div></div></blockquote><br></div></span><div>I agree. It would make enum cases feel more consistent with the rest of the language to make them lowerCamelCase.</div><div><br></div><div>-Joe</div><br></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Trent Nadeau</div>
</div></div></div>