Well, my question was not "why were they removed?", but "what can I do to get them back?". And they were removed -- they were there!
I have seen the link (back when it was just a proposal), and I cannot find a compelling removal reason in the list of disadvantages. Let's cover each in turn:
The above list seems seems so negative, I know. What is missing is the positives that increment and decrement provide; I tried to express that before. Sure, I'd love to have the ?
My biggest surprise with Swift was the removal of the pre and post increment and decrement (++ and --) in Swift 3. These are well defined and commonly used operators — heck, the name of one of the most popular languages is a word-play on the post-increment operator. In fact, you'd be hard-pressed to find another modern language out there that does not have them.
My real issue is that they are part of the coding part of my brain — when I want to increment, I automatically type "++". Sure, Xcode will offer to "fix" it for me; but that means that Xcode knows what I mean!
At the center of my issue is there is meaning beyond "add one" or "subtract one" in those operators: increment is a concept that, yes, when applied to a number, is equivalent to adding one to that number; but when the developer (e.g., me) sees the increment operator, there is immediate communication of what is transpiring without having to (visually — again, it's the developer to whom I am referring) parse an equation, then further determine if it is really an arithmetic operation or an increment. For instance, I don't think a language called "c += 1" would have caught on.
The problem of conflating incrementing and decrementing with addition and subtraction becomes even worse when considering operator overloading. For example, if I am creating a class where it is meaningful to increment or decrement but not to support full-blown addition or subtraction, without ++ and --, I am stuck with implementing addition and subtraction methods that throw runtime exceptions when given values other than 1.
You may counter that everybody can easily get along without them. Well, if you did, I would respond that, no, I am running into this all of the time and it drives me a bit nuts (ok, a bit more nuts).
Basically, the solution to encountering these handy, meaningful, and otherwise universally available operators should not be "stop using them" — especially when Swift used to have them!
So, I guess my question is not "why were they removed?", but rather "what can I do to get them re-added?"
var a = 3
let b = a++ * 3
Now, I expect this type of code is the justification Apple is using to remove the operator; although there is no ambiguity, the line which sets b also sets a.
I argue that prefix and postfix ++ and -- should have remained in Swift. Not only are they well defined, but they are a standard operator in almost all new languages and therefore convey their meaning to the application developer significantly better than += 1 or -= 1 ever could.
For example, when reading code, ++i requires significantly less reading and parsing by the developer than i += 1 to convey the same idea.
Thus, when someone asks "I learned emacs and now I find myself on a computer that has no emacs," I respond, "install it or use an editor that is similar." This seems (to me, at least) more help than "you were foolish to learn an editor that is not installed on every unix; go learn vi."
When I visit a customer, I bring a disc containing distributions of lots of tools, including editors. You do not need extra privileges to compile and run these tools (well most of them, anyway -- certainly not a text editor!) and it solves the issue of not knowing which flavor of Unix you will be facing. Additionally, it reflects that you, in fact, know what you are doing. At least in my experience.
By all means embrace vi (or vim or viper or whatever). It has been used to build fantastic things. But you ought not object to others using some other editor. I suspect you'll have a difficult time having fun with that attitude.
There are many other open-source licenses besides GPL.
However, I think it is fair to say that in today's world, a jailbreak is something that is done intentionally by the owner of a device to gain access to features that are otherwise denied, whereas rooting is done by nefarious n'er-do-wells with evil intent. Oh yeah, and Sony.
10 to the minus 6th power Movie = 1 Microfilm