Camel-case, mild preference for lower since keywords are lower<br><br>On Friday, 26 February 2016, Jordan Rose via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree that camel-case is more readable than all-lowercase, although the only all-lowercase names currently are '#dsohandle' (very rarely used) and '#elseif' / '#endif'. I also have a knee-jerk reaction against '#endIf'; somehow '#EndIf' doesn't seem quite as bad to me.<br>
<br>
I can see the argument for naming the expression-like directives like values. I'm not sure whether it's necessary that the non-expression-like directives follow the same naming convention. Something to explore.<br>
<br>
Jordan<br>
<br>
<br>
> On Feb 25, 2016, at 11:06, Антон Жилин via swift-evolution <<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a>> wrote:<br>
><br>
> Currently, Swift follows all-lower convention for #-directives. We haven't discussed it much, but just derived it from a few existing directives we have.<br>
> Now people invent new directives: #setline, #fileliteral. Now it becomes obvious that lowercase just breaks down for anything long enough. CamelCase is much more clear (read distinguishable) than thatlowercasemess. Compare:<br>
><br>
> #colorliteral vs #colorLiteral<br>
> #imageliteral vs #imageLiteral<br>
> #setline vs #setLine<br>
><br>
> Directives read like functions:<br>
><br>
> #fileLiteral(resourceName: "name")<br>
> #setLine(1)<br>
> #available(iOS 8.0, *)<br>
><br>
> One may say that their arguments aren't really Swift values and objects, but that's why they are directives, after all.<br>
><br>
> #if stands out a bit, but the change will not affect it.<br>
> _______________________________________________<br>
> swift-evolution mailing list<br>
> <a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a><br>
> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote><br><br>-- <br>-- Howard.<br>