<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><ul style="list-style-type: none" dir="ltr" id="yui_3_16_0_1_1455052779955_5393" class="">
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5395" class="">A brief observation regarding variable type declarations</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5397" class=""><br id="yui_3_16_0_1_1455052779955_5399" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5401" class="">I find the colon in variable type declarations a little odd.</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5403" class="">Consider the following:</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5405" class=""><br id="yui_3_16_0_1_1455052779955_5407" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5409" class="">var welcomeMessage: String</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5411" class=""><br id="yui_3_16_0_1_1455052779955_5413" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5415" class="">wouldn't this be cleaner simply written as</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5417" class=""><br id="yui_3_16_0_1_1455052779955_5419" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5421" class="">var welcomeMessage String</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5423" class=""><br id="yui_3_16_0_1_1455052779955_5425" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5427" class=""><br id="yui_3_16_0_1_1455052779955_5429" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5431" class="">the documentation says to read the colon ':' as "of type" in such situations</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5433" class=""><br id="yui_3_16_0_1_1455052779955_5435" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5437" class="">but does the type "String" itself not imply 'of type String'</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5439" class=""><br id="yui_3_16_0_1_1455052779955_5441" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5443" class=""><br id="yui_3_16_0_1_1455052779955_5445" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5447" class=""><br id="yui_3_16_0_1_1455052779955_5449" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5451" class="">Consider the colon in a function declaration:</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5453" class=""><br id="yui_3_16_0_1_1455052779955_5455" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5457" class="">func sayHello(personName: String) {}</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5459" class=""><br id="yui_3_16_0_1_1455052779955_5461" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5463" class="">I would read the portion within the brackets as:</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5465" class="">parameter named personName takes value of type String (because you input values when calling functions)</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5467" class="">with the colon reading 'takes value' and "String" again reading 'of type String'</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5469" class=""><br id="yui_3_16_0_1_1455052779955_5471" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5473" class=""><br id="yui_3_16_0_1_1455052779955_5475" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5477" class=""><br id="yui_3_16_0_1_1455052779955_5479" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5481" class="">I find the colon ':' strongly associated with function input values, and with associations [key:value pairs etc]</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5483" class="">but variables…you don't input anything and they are not inherently associations.</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5485" class=""><br id="yui_3_16_0_1_1455052779955_5487" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5489" class=""><br id="yui_3_16_0_1_1455052779955_5491" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5493" class="">When coding half asleep I find myself compelled to input a value wherever I see a ':' and I can see myself typing something really really silly</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo; min-height: 14px;" id="yui_3_16_0_1_1455052779955_5495" class=""><br id="yui_3_16_0_1_1455052779955_5497" class=""></li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5499" class="">var myIndex: "Int"&nbsp;</li>
<li style="margin: 0px; font-size: 12px; font-family: Menlo;" id="yui_3_16_0_1_1455052779955_5501" class="">myIndex = 0</li></ul></div></body></html>