<div dir="ltr">I think both of the camel-case conventions are much easier to read, and both are fine with me. I slightly prefer the former (UpperCamelCase), but that just might be because the only languages I've used with annotations that also have camel-case conventions (Java and C#) both use UpperCamelCase.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 17, 2016 at 1:43 PM, Erica Sadun 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"><div>Do you have an alternative suggestion? I can add the following to the Alternatives Considered:</div><div><br></div><div>Using lowercase for attributes names becomes confusing with longer compound examples. For example `warnunusedresult`</div><div>looks a lot like a continuous string of lowercase characters. I recommend the Swift team consider introducing upper camel case</div><div>for attributes to match the Cocoa members (<code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">UIApplicationMain</code><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255)">, </span><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">NSManaged</code><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255)">, </span><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">NSCopying</code><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;background-color:rgb(255,255,255)">, </span><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">NSApplicationMain, IBAction, IBDesignable, IBInspectable, IBOutlet</code>) or lower</div><div>camel case to avoid this issue:</div><div><br></div><div>@AutoClosure, @Available, @ObjC, @NoEscape, @NonObjC, @NoReturn, @Testable, @WarnUnusedResult, @Convention, @NoReturn</div><div><br></div><div>or</div><div><br></div><div>@autoClosure, @available, @objC, @noEscape, @nonObjC, @noReturn, @testable, @warnUnusedResult, @convention, @noReturn</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- E</div></font></span><div><div class="h5"><div><br></div><div><br></div><div><blockquote type="cite"><div>On Feb 17, 2016, at 11:36 AM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>> wrote:</div><br><div><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">On Wed, Feb 17, 2016 at 10:18 AM, Erica Sadun via swift-evolution</span><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"><</span><a href="mailto:swift-evolution@swift.org" style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">swift-evolution@swift.org</a><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">> wrote:</span><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">For your consideration: Attribute Ophidiophobia. Feedback and suggestions<br>welcome. -- Erica<br><br>Modernizing Attribute Case and Attribute Argument Naming<br><br>Proposal: TBD<br>Author(s): Erica Sadun<br>Status: TBD<br>Review manager: TBD<br><br>Introduction<br><br>Two isolated instances of snake case remain in the Swift attribute grammar.<br>This proposal updates those elements to bring them into compliance with<br>modern Swift language standards.<br><br>The Swift-Evolution discussion of this topic took place in the "[Discussion]<br>Modernizing Attribute Case and Attribute Argument Naming" thread. Hat tip to<br>Michael Wells<br><br>Motivation and Detail Design<br><br>Parts of the Swift attribute grammar retain lower snake case patterns that<br>no longer match modern conventions:<br><br>The warn_unused_result attribute should use lowercase and be renamed<br>warnunusedresult.<br></blockquote><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Hi Erica,</span><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Maybe it is just me, but I find @warnunusedresult to be unreadable --</span><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">it looks like a continuous string of lowercase characters at a glance.</span><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Dmitri</span><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">--<span> </span></span><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if</span><br style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">(j){printf("%d\n",i);}}} /*Dmitri Gribenko <</span><a href="mailto:gribozavr@gmail.com" style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">gribozavr@gmail.com</a><span style="font-family:Palatino-Roman;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">>*/</span></div></blockquote></div><br></div></div></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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 class="gmail_signature">Trent Nadeau</div>
</div>