<div dir="ltr">Well... I continue writing code with Swift 2.2 and I'm not loving the fact I cannot use ++ or -- anymore (and no, I'm not using the operators in loops, I mean things like responding to UIPageViewController data source, etc).<div><br></div><div>And what if we remove `+=` and `-=` as well? It's so C... What if can write code with COBOL-style like this?</div><div><br></div><div><br></div><div><span style="font-family:monospace,monospace">ADD 1 TO MY-AWESOME-VARIABLE.</span><br></div><div><font face="monospace, monospace">SUBTRACT 1 FROM MY-AWESOME-VARIABLE.</font></div><div><br></div><div><br></div><div>And look that we are not adding a `WORKING-STORAGE SECTION` or a `PROCEDURE DIVISION` here...</div><div><br></div><div>Do not take it seriously, OK? It was just a joke (a bad taste joke, perhaps). ;-)</div><div><br></div><div>-Van</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 31, 2016 at 10:39 PM, Jonathan Tang <span dir="ltr"><<a href="mailto:jonathan.d.tang@gmail.com" target="_blank">jonathan.d.tang@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sun, Jan 31, 2016 at 6:19 AM, Tino Heth 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><span><blockquote type="cite"><div><div dir="ltr"><div style="margin:0px;font-size:11px;line-height:normal;font-family:Helvetica">I do not know how far the Swift is to the adolescence, but it is certain that teenagers are rebels. There's something very good at it. In most cases they are to be certain. But in some things they regret later.</div></div></div></blockquote></span>Children have to learn their own lessons — and I guess re-adding "++" wouldn't be as complicated as a big tattoo on your neck ;-)</div><div><br></div><div>My first thought on the removal was "we'll see many custom post-increment operators soon", and that may be true; but in the meantime, I came to the conclusion that I won't define those custom operators, but rather configure my system to replace "++" with " += 1":</div>Typing the old operator is definitely faster, but I don't mind if it's turned into something else automatically (when there is no performance gain for pre-increment, I've always preferred the post-variants).<div><br></div><div><br></div></div></blockquote><div><br></div></span><div>FWIW, Python has no ++ and -- operators (you have to use += 1 or -= 1), and nobody misses them there. Once you introduce for-each loops, about 99% of the usage sites for ++ disappear, and it quickly fades out of your muscle memory.</div><div><br></div><div>It used to get re-introduced every so often by having to work with C, Java, and Javascript, but now ES6, Java, Objective-C, PHP, Python, Ruby, Go, Rust, and even C++ all have for-each loops or iteration blocks, so there's basically no need for regular for-loops or increment operators in any language but C.</div></div></div></div>
</blockquote></div><br></div>