<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 30, 2016, at 11:13 AM, Vanderlei Martinelli via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello. <span style="font-size:13px" class="">I also like the alternative: keep ++ and -- while returning void. :-)</span></div></div></blockquote><div><br class=""></div><div>Vanderlei, please read the proposal in question. This alternative is directly addressed at the end.</div><div><br class=""></div><div>-Chris</div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Jan 30, 2016 at 5:00 PM, Will Stanton <span dir="ltr" class=""><<a href="mailto:willstanton1@yahoo.com" target="_blank" class="">willstanton1@yahoo.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Van,<br class="">
<br class="">
I think you make some good points about readability, and I do not recall the retention of ‘++’ and ‘--' being discussed much, perhaps since SE-0004 and 0007 were accepted. All the same:<br class="">
<br class="">
At first, I really disliked the removal of ++ and --. In my opinion, the first three disadvantages in SE-0004 (<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0004-remove-pre-post-inc-decrement.md" rel="noreferrer" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0004-remove-pre-post-inc-decrement.md</a>) were not that strong:<br class="">
<br class="">
> These operators increase the burden to learn Swift as a first programming language - or any other case where you don't already know these operators from a different language.<br class="">
<br class="">
‘++’ does not seem less obvious than ‘+=’ and learning about the 2-4 extra operators doesn’t seem burdensome.<br class="">
++ and -- are also not particularly rare (I remember being surprised that Python did not support them)<br class="">
<br class="">
> Their expressive advantage is minimal - x++ is not much shorter than x += 1.<br class="">
Still, `++` is easier to type than `+= 1`<br class="">
<br class="">
> Swift already deviates from C in that the =, += and other assignment-like operations returns Void (for a number of reasons). These operators are inconsistent with that model.<br class="">
<br class="">
I liked the alternative considered: keep ++ and -- while returning void<br class="">
<br class="">
<br class="">
<br class="">
But over a few days I became less bothered by the proposal. I agreed with this:<br class="">
> Swift has powerful features that eliminate many of the common reasons you'd use ++i in a C-style for loop in other languages, so these are relatively infrequently used in well-written Swift code. These features include the for-in loop, ranges, enumerate, map, etc.<br class="">
<br class="">
<br class="">
I respectfully disagree with removing the operators but also don’t have strong objections.<br class="">
<br class="">
Regards,<br class="">
Will Stanton<br class="">
<div class="HOEnZb"><div class="h5"><br class="">
> On Jan 30, 2016, at 1:12 PM, Vanderlei Martinelli via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class="">
><br class="">
> Hello everybody.<br class="">
><br class="">
> I see Swift as a member of “C family" (a granddaughter/grandson of C, a daughter/son of Objective-C). OK, she/he is different and has her/his own personality like a daughter/son should be and have, but I still like to see Swift and recognize some traces that I know are things that became from C.<br class="">
><br class="">
> This said, I would like to say that after the removal of `++` and `--` my code becomes less readable and more prone to errors. There were two characters to differentiate an addition from a subtraction, now there is only one (`+= 1`, `-= 1`). Also the character keys are very close in the US keyboard so it is easier to make a mistake and is not as simple as the previous solution when I typed two times the same key. Using Erica's way of saying certain things: I do not love the removal of `++` and `--`.<br class="">
<br class="">
</div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>