<div dir="ltr">Im for keeping this<div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="color:rgb(187,44,162)">if</span> <span style="color:rgb(187,44,162)">var</span> x = x {</blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div style="font-size:13px"><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></div></div></div></div></blockquote><div><div>Actually, I&#39;m hoping Swift allows us to group let/var/optional and non-optional together. At the moment, a lot of my functions start out with a couple groups of declarations, before I get to the &quot;meat&quot; of my function. I&#39;m hoping someday  we can do this:</div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><br></div></div><div><div>// set up, make sure we unwrap whatever needs unwrapping, and set up whatever vars we&#39;ll use</div></div><div><div><br></div></div><div><div>guard </div></div><div><div><span style="white-space:pre">        result_var = Gronk.init()</span></div></div><div><div><span class="" style="white-space:pre">        foo_const = arg.bar_opt,</span></div></div><div><div><span class="" style="white-space:pre">        baz_var = do_something(  )</span></div></div><div><div><div><span class="" style="white-space:pre">        quux_const = 1567</span></div></div></div><div><div><span class="" style="white-space:pre">else { return nil }</span></div></div><div><div><span class="" style="white-space:pre"><br></span></div></div><div><div>// the &quot;meat&quot; of my function</div></div><div><div><br></div></div><div><div>...</div></div><div><div><br></div></div></blockquote><div><div>The reason I&#39;d like to arrange things this way is that I could spend more time focusing on the logic side of my functions, instead of having to parse though where my nil checks, and declarations end. </div><div><br></div><div>This might be obvious bad form to someone who&#39;s taken more CompSci classes than I have. I realize that for example, having one point of failure for several unrelated things is ambiguous, and that there would need to be more syntax to specify what is being declared as let vs var.</div><div><br></div><div><br></div></div></div>