3 ms·
Note that if anyone truly misses these operators, you can add them back with a few lines of code. Swift has extensive support for custom operators, and if ++ an
by mikeash 11y ago
Note that if anyone truly misses these operators, you can add them back with a few lines of code. Swift has extensive support for custom operators, and if ++ and -- disappear as built-in operators, you can just implement them as custom operators.
I see a lot of people complaining that they like ++ and -- who may not realize that they can still have it if they want it. I get that there are legitimate questions over whether it's wise for the community and such, but for your own work, you can still have it if you want it.
- mei0Iesh 11y agoThat's good. Can you make anything? Like x+ is x+=1, x++ is x+=2, x+++ is x+=3? x+++++++++++++++++++++++++++++
- mikeash 11y agoYep: http://swiftstub.com/43404468 http://swiftstub.com/43404468 Obviously you should be careful not to commit such atrocities in any code that might ever see production.