<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="">English has a number of rules. &nbsp;Ones which people, unfortunately break daily which results in often difficult to read text. &nbsp;A colon in code is just like a colon in English—punctuation. &nbsp;Punctuation helps us to read with understanding. &nbsp;As I had stated previously, it’s like placing quotation marks around a quotation. &nbsp;Without them, you may be able to identify the quote; however, with them, you can identify quotes with a simple glance. &nbsp;You don’t have to read for context. &nbsp;Thus punctuation provides readability. &nbsp;Readability is a part of the foundation of simple, easy to use and understand code.<div class=""><br class=""></div><div class="">Your idea of ideal is rather unrealistic. &nbsp;You find the iPhone to require “no instruction manual”; however, knowing people myself who don’t readily use computers and thus do not have the intuitive approach to electronics find the iPhone and any other electronic device to be a mystery. &nbsp;No one “just knows”. &nbsp;You have to have learned and experienced electronics to know how they to do x, y, z tasks. &nbsp;So, yes, there is a Swift Language Guide for good reason. &nbsp;Swift’s use of punctation, it’s syntax, it’s way of approaching code is just slightly different from C-type languages, functional programming languages, etc. &nbsp;That’s what makes it a separate language. &nbsp;If it’s a separate language, how can you possibly “just know it”? &nbsp;I am not personally that gifted, but perhaps you are.</div><div class=""><br class=""></div><div class="">Myles</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 11, 2016, at 3:48 PM, Oliver M &lt;<a href="mailto:selectedfordeletion@yahoo.com" class="">selectedfordeletion@yahoo.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><table cellspacing="0" cellpadding="0" border="0" class=""><tbody class=""><tr class=""><td valign="top" class=""><div class="">The point is to bring swift closer to natural English and further away from geek speak, making it easier to learn and use.<br class=""><br class="">(Ideally a programming language would require no guide book at all, just like the iPhone requires no instruction manual...an unattainable goal but a worthy pursuit)<br class=""><br class="">var myMessage String<br class=""><br class="">What do you need to know that the above line does not tell you?<br class=""><br class=""></div></td></tr></tbody></table>            <div id="_origMsg_" class="">
                <div class="">
                    <br class="">
                    <div class="">
                        <div style="font-size:0.9em" class="">
                            <hr size="1" class="">
                            <b class="">
                                <span style="font-weight:bold" class="">From:</span>
                            </b>
                            Myles Schultz &lt;<a href="mailto:myleslschultz@icloud.com" class="">myleslschultz@icloud.com</a>&gt;;                            <br class="">
                            <b class="">
                                <span style="font-weight:bold" class="">To:</span>
                            </b>
                            Oliver M &lt;<a href="mailto:selectedfordeletion@yahoo.com" class="">selectedfordeletion@yahoo.com</a>&gt;;                                                                             <br class="">
                            <b class="">
                                <span style="font-weight:bold" class="">Subject:</span>
                            </b>
                            Re: [swift-evolution] an observation on colons in variable type declarations                            <br class="">
                            <b class="">
                                <span style="font-weight:bold" class="">Sent:</span>
                            </b>
                            Thu, Feb 11, 2016 1:06:12 AM                            <br class="">
                        </div>
                            <br class="">
                            <table cellspacing="0" cellpadding="0" border="0" class="">
                                <tbody class="">
                                    <tr class="">
                                        <td valign="top" class=""><div class="">Perhaps I have missed the point of what you were trying to say, but if you read the swift programming guide, you knew exactly what it was telling you. Like any language, one has to learn its conventions, it's grammar, etc. I don't see what is so confusing by the colon. It means "of type". It's narrow enough, in literal size, that it doesn't distract you like -&gt; would. Yet, it is obvious enough that you can tell that an instant of a particular type is being declared. It's very clean and looks really nice in type. Personally, I think the colon is a keeper. &nbsp;<br clear="none" class=""><br clear="none" class="">Sent from my iPhone</div><div class="yqt8273333736" id="yqt85152"><div class=""><br clear="none" class="">On Feb 10, 2016, at 2:20 AM, Oliver M &lt;<a rel="nofollow" shape="rect" ymailto="mailto:selectedfordeletion@yahoo.com" target="_blank" href="javascript:return" class="">selectedfordeletion@yahoo.com</a>&gt; wrote:<br clear="none" class=""><br clear="none" class=""></div><blockquote type="cite" class=""><div class=""><table cellspacing="0" cellpadding="0" border="0" class=""><tbody class=""><tr class=""><td colspan="1" rowspan="1" valign="top" class=""><div class="">When I first read:<br clear="none" class=""><br clear="none" class="">var myMessage: String<br clear="none" class=""><br clear="none" class="">I knew a variable was being declared.<br clear="none" class="">I knew the name of the variable.<br clear="none" class="">I knew it was of type String.<br clear="none" class=""><br clear="none" class="">I just couldn't figure out what on earth the colon was trying to tell me. Was this some sort of new swift construct??? A hybrid variable/function declaration? I was completely stumped!</div></td></tr></tbody></table>            <div id="_origMsg_" class="">
                <div class="">
                    <br clear="none" class="">
                    <div class="">
                        <div style="font-size:0.9em;" class="">
                            <hr size="1" class="">
                            <b class="">
                                <span style="font-weight:bold;" class="">From:</span>
                            </b>
                            Myles Schultz &lt;<a rel="nofollow" shape="rect" ymailto="mailto:myleslschultz@icloud.com" target="_blank" href="javascript:return" class="">myleslschultz@icloud.com</a>&gt;;                            <br clear="none" class="">
                            <b class="">
                                <span style="font-weight:bold;" class="">To:</span>
                            </b>
                            Oliver M &lt;<a rel="nofollow" shape="rect" ymailto="mailto:selectedfordeletion@yahoo.com" target="_blank" href="javascript:return" class="">selectedfordeletion@yahoo.com</a>&gt;;                                                                             <br clear="none" class="">
                            <b class="">
                                <span style="font-weight:bold;" class="">Subject:</span>
                            </b>
                            Re: [swift-evolution] an observation on colons in variable type declarations                            <br clear="none" class="">
                            <b class="">
                                <span style="font-weight:bold;" class="">Sent:</span>
                            </b>
                            Tue, Feb 9, 2016 11:48:15 PM                            <br clear="none" class="">
                        </div>
                            <br clear="none" class="">
                            <table cellspacing="0" cellpadding="0" border="0" class=""><tbody class=""><tr class=""><td colspan="1" rowspan="1" valign="top" class=""><div class="">When you're working in Xcode where you have a color differentiation between the instance name and it's type, then taking out the colon may not seem like as big a deal. However, seeing your example below in black and white makes it quite that, no is not obvious that welcomeMessage is of type String. Instead it just looks like one long phrase on a line in an email. I think this comes down to punctuation. Think of writing a story an then every time a character says something, you take out the quotation marks. Now, you can certainly grasp from reading the surrounding text that someone is now saying something in many cases, but it is so much more clear with punctuation (the quotation marks). That's why they're there, readability. I feel the same is true here--the colon adds a significant amount of readability.
 One can make a quick glance at a block of code and if you know the Swift
 language, you'll instantly pick out the variable names and their types.&nbsp;<br clear="none" class=""><br clear="none" class="">Sent from my iPhone</div><div class="yqt4151516351" id="yqt90886"><div class=""><br clear="none" class="">On Feb 9, 2016, at 5:45 PM, Oliver M via swift-evolution &lt;<a rel="nofollow" shape="rect" class="">swift-evolution@swift.org</a>&gt; wrote:<br clear="none" class=""><br clear="none" class=""></div><blockquote type="cite" class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><ul style="list-style-type:none;" dir="ltr" id="yui_3_16_0_1_1455052779955_5393" class=""><li class="" id="yui_3_16_0_1_1455052779955_5395" style="margin:0px;font-size:12px;font-family:Menlo;">A brief observation regarding variable type declarations</li><li class="" id="yui_3_16_0_1_1455052779955_5397" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5399"></li><li class="" id="yui_3_16_0_1_1455052779955_5401" style="margin:0px;font-size:12px;font-family:Menlo;">I find the colon in variable type declarations a little odd.</li><li class="" id="yui_3_16_0_1_1455052779955_5403" style="margin:0px;font-size:12px;font-family:Menlo;">Consider the following:</li><li class="" id="yui_3_16_0_1_1455052779955_5405" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5407"></li><li class="" id="yui_3_16_0_1_1455052779955_5409" style="margin:0px;font-size:12px;font-family:Menlo;">var welcomeMessage: String</li><li class="" id="yui_3_16_0_1_1455052779955_5411" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5413"></li><li class="" id="yui_3_16_0_1_1455052779955_5415" style="margin:0px;font-size:12px;font-family:Menlo;">wouldn't
 this be cleaner simply written as</li><li class="" id="yui_3_16_0_1_1455052779955_5417" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5419"></li><li class="" id="yui_3_16_0_1_1455052779955_5421" style="margin:0px;font-size:12px;font-family:Menlo;">var welcomeMessage String</li><li class="" id="yui_3_16_0_1_1455052779955_5423" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5425"></li><li class="" id="yui_3_16_0_1_1455052779955_5427" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5429"></li><li class="" id="yui_3_16_0_1_1455052779955_5431" style="margin:0px;font-size:12px;font-family:Menlo;">the documentation says to
 read the colon ':' as "of type" in such situations</li><li class="" id="yui_3_16_0_1_1455052779955_5433" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5435"></li><li class="" id="yui_3_16_0_1_1455052779955_5437" style="margin:0px;font-size:12px;font-family:Menlo;">but does the type "String" itself not imply 'of type String'</li><li class="" id="yui_3_16_0_1_1455052779955_5439" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5441"></li><li class="" id="yui_3_16_0_1_1455052779955_5443" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5445"></li><li class="" id="yui_3_16_0_1_1455052779955_5447" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5449"></li><li class="" id="yui_3_16_0_1_1455052779955_5451" style="margin:0px;font-size:12px;font-family:Menlo;">Consider the colon in a function declaration:</li><li class="" id="yui_3_16_0_1_1455052779955_5453" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5455"></li><li class="" id="yui_3_16_0_1_1455052779955_5457" style="margin:0px;font-size:12px;font-family:Menlo;">func sayHello(personName: String) {}</li><li class="" id="yui_3_16_0_1_1455052779955_5459" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5461"></li><li class="" id="yui_3_16_0_1_1455052779955_5463" style="margin:0px;font-size:12px;font-family:Menlo;">I would read the portion within the brackets as:</li><li class="" id="yui_3_16_0_1_1455052779955_5465" style="margin:0px;font-size:12px;font-family:Menlo;">parameter named personName takes value of type String (because you input values when calling functions)</li><li class="" id="yui_3_16_0_1_1455052779955_5467" style="margin:0px;font-size:12px;font-family:Menlo;">with the colon reading 'takes value' and "String" again reading 'of type String'</li><li class="" id="yui_3_16_0_1_1455052779955_5469" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5471"></li><li class="" id="yui_3_16_0_1_1455052779955_5473" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5475"></li><li class="" id="yui_3_16_0_1_1455052779955_5477" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5479"></li><li class="" id="yui_3_16_0_1_1455052779955_5481" style="margin:0px;font-size:12px;font-family:Menlo;">I find the colon ':' strongly associated with function input values, and with associations [key:value pairs etc]</li><li class="" id="yui_3_16_0_1_1455052779955_5483" style="margin:0px;font-size:12px;font-family:Menlo;">but variables…you don't input anything and they are not inherently associations.</li><li class="" id="yui_3_16_0_1_1455052779955_5485" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5487"></li><li class="" id="yui_3_16_0_1_1455052779955_5489" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5491"></li><li class="" id="yui_3_16_0_1_1455052779955_5493" style="margin:0px;font-size:12px;font-family:Menlo;">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 class="" id="yui_3_16_0_1_1455052779955_5495" style="margin:0px;font-size:12px;font-family:Menlo;min-height:14px;"><br clear="none" class="" id="yui_3_16_0_1_1455052779955_5497"></li><li class="" id="yui_3_16_0_1_1455052779955_5499" style="margin:0px;font-size:12px;font-family:Menlo;">var myIndex: "Int"&nbsp;</li><li class="" id="yui_3_16_0_1_1455052779955_5501" style="margin:0px;font-size:12px;font-family:Menlo;">myIndex = 0</li></ul></div></div></blockquote></div><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br clear="none" class=""><span class="">swift-evolution mailing list</span><br clear="none" class=""><span class=""><a rel="nofollow" shape="rect" class="">swift-evolution@swift.org</a></span><br clear="none" class=""><span class=""><a rel="nofollow" shape="rect" target="_blank" href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br clear="none" class=""></div></blockquote></td></tr></tbody></table>
                    </div>
                </div>
            </div>
</div></blockquote></div></td>
                                    </tr>
                                </tbody>
                            </table>
                    </div>
                </div>
            </div>
</div></blockquote></div><br class=""></div></body></html>