<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="">Java enums are actually new subclasses (with a singleton instance).<div class=""><br class=""></div><div class="">However, the problem is one of consistency. How do you explain to developers the intuition behind these statements and the choice of UpperCamelCase vs lowerCamelCase?</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">import</span> Foundation</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">import</span> UIKit</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let</span> w:<span style="color: rgb(112, 61, 170);" class="">NSComparisonResult </span> = .<span style="color: rgb(61, 29, 129);" class="">OrderedAscending</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal; color: rgb(112, 61, 170);" class=""><span style="color: rgb(187, 44, 162);" class="">let</span><span style="color: rgb(0, 0, 0);" class=""> x:</span>UnicodeDecodingResult<span style="color: rgb(0, 0, 0);" class=""> = .</span><span style="color: rgb(61, 29, 129);" class="">Result</span><span style="color: rgb(0, 0, 0);" class="">(</span><span style="color: rgb(209, 47, 27);" class="">"☃"</span><span style="color: rgb(0, 0, 0);" class="">)</span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> y:<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">UIRectEdge </span> = .Top</div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="color: rgb(187, 44, 162);" class="">let</span> z:<span style="color: rgb(112, 61, 170);" class="">CGPoint</span> = .zero</div><div style="margin: 0px; line-height: normal; color: rgb(112, 61, 170);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(112, 61, 170);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(112, 61, 170);" class="">-DW</div></div><div class=""><div><blockquote type="cite" class=""><div class="">On Jan 28, 2016, at 4:28 PM, Ricardo Parada 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=""><div class=""><br class="">I am used to enum cases being UpperCamelCase from Java, although sometimes I’ve seen them in all caps. I think of enum cases as their own type even though they are a member of the enum type. <br class=""><br class="">It is similar to inner classes in Java for example. I would not like enum cases to be lowerCamelCase.<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Jan 23, 2016, at 1:45 PM, Kevin Lundberg via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Jan 23, 2016, at 1:24 PM, Trent Nadeau via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class="">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).<br class=""></blockquote><br class="">This reasoning makes sense to me. It's also a convention that I've seen on other languages like Java and C# where enum cases are capitalized even though they aren't strictly types of their own.<br class=""><br class=""><blockquote type="cite" class="">Option set elements, on the other hand, I think really are values so it may make sense for those to be lowerCamelCase.<br class=""></blockquote><br class="">I think of option set elements in the same way as enums here, where each option set option can behave as an individual singleton type that represents a specific value. The way they're used reminds me a lot of how enums are typically used, just with multiple instances at once in a set instead of a single enum case.<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="">https://lists.swift.org/mailman/listinfo/swift-evolution<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="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></div></body></html>