3 ms·
I've always felt like Python and Ruby chose to drop these to discourage you from writing traditional loops, as they have their own enumerators to accomplish the
by vlunkr 11y ago
I've always felt like Python and Ruby chose to drop these to discourage you from writing traditional loops, as they have their own enumerators to accomplish the same thing. And, as the author mentioned, so does Swift. Obviously you still have to do a '+=' occasionally, but I don't find myself doing that often.
- rtpg 11y agoYeah, I think the core difference between i++ and i+=1 (expression vs statemrnt) is mainly useful in situations where higher level structures are available in languages that aren't C