Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@SortOfTested Yes it was there if I'm not mistaken in Swift 1, maybe v2 too but not sure tbh
@jespersh Yes unfortunately, their excuse is simply implying that, who would find it hard to understand that: x++ is the same as x += 1 -
@gitpush
Removing an operator is a bit wtf. I assume given that decision operators are just functions in swift? -
CptFox16194y@gitpush The thing some find hard to understand is that (in most languages where it exists), `i++` is not just a statement (like `i += 1`, although some languages might still treat it as an expression, haven't really checked, sorry), but also an expression which returns the value of `i` before incrementation, in contrast with `++i` which returns the new value of `i`.
It's really useful when reading through an array, but can confuse people less familiar with this mutations that return an old value. That's why a lot of new language opt not to have ++ any more. But removing it after laugh, damn that's a big ass breaking change...
Was working with Swift lately, we no longer have: x++ in Swift, and I wrote rowIndex += 1, and go-lint was not happy about it ....
random