<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Wouldn’t this enforce enum cases and some static struct variables to be lowercase?</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;"><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;">public</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">enum</span><span style="font-variant-ligatures: no-common-ligatures;"> UINavigationControllerOperation: </span><span style="font-variant-ligatures: no-common-ligatures;">Int</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro'; min-height: 14px;"><span style="font-variant-ligatures: no-common-ligatures;"> </span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;"> case</span><span style="font-variant-ligatures: no-common-ligatures"> None</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;"> case</span><span style="font-variant-ligatures: no-common-ligatures"> Push</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;"> case</span><span style="font-variant-ligatures: no-common-ligatures"> Pop</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;">}</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;"><br></span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;">public</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">struct</span><span style="font-variant-ligatures: no-common-ligatures;"> NSLayoutFormatOptions: </span><span style="font-variant-ligatures: no-common-ligatures;">OptionSetType</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;"> public</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures;">init</span><span style="font-variant-ligatures: no-common-ligatures">(rawValue: </span><span style="font-variant-ligatures: no-common-ligatures;">UInt</span><span style="font-variant-ligatures: no-common-ligatures">)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro'; min-height: 14px;"><span style="font-variant-ligatures: no-common-ligatures"> </span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;"> public</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures;">static</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures"> AlignAllLeft: </span><span style="font-variant-ligatures: no-common-ligatures;">NSLayoutFormatOptions</span><span style="font-variant-ligatures: no-common-ligatures"> { get }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;"> public</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures;">static</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures"> AlignAllRight: </span><span style="font-variant-ligatures: no-common-ligatures;">NSLayoutFormatOptions</span><span style="font-variant-ligatures: no-common-ligatures"> { get }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"> // etc.</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Source Code Pro';"><span style="font-variant-ligatures: no-common-ligatures;">}</span></p></div> <div><br></div>Is this really a welcome change? I mean I’d love to see the drop of `.self` magic from types, but not sure about the UppercaseTypes, lowercaseValue convention here.<div><br> <div id="bloop_sign_1462518632266419968" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Adrian Zubarev<br>Sent with Airmail</div></div> <br><p class="airmail_on">Am 6. Mai 2016 bei 09:08:57, Pyry Jahkola via swift-evolution (<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>) schrieb:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div></div><div>
<title></title>
<blockquote type="cite" class="">I understand why the alternative
of changing the generic type parameter list symbols was rejected,
to be consistent with other C based languages, but I don't
understand why the following was rejected:</blockquote>
<div>
<blockquote type="cite" class="">
<div dir="auto" class="">
<div class=""><br class=""></div>
<div class="">
<ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 16px;" class="">
<li style="box-sizing: border-box;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">making
the <code style="box-sizing: border-box; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;" class="">UppercaseTypes</code>, <code style="box-sizing: border-box; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;" class="">lowercaseValues</code> convention a syntactic
requirement, as is done in ML and Haskell.</span></li>
</ul>
<div class="">I see that as a good viable alternative.</div>
</div>
</div>
</blockquote>
</div>
<br class="">
+1, enforcing the initial character case of type and value
identifiers would clear up the language IMO.
<div class=""><br class=""></div>
<div class="">It would also mean we'd need to bridge all C APIs in
correct case.</div>
<div class=""><br class=""></div>
<div class="">Also, in general +1 to getting rid of `.self`.</div>
<div class=""><br class=""></div>
<div class="">— Pyry</div>
_______________________________________________<br>swift-evolution mailing list<br>swift-evolution@swift.org<br>https://lists.swift.org/mailman/listinfo/swift-evolution<br></div></div></span></blockquote></div></body></html>