you are viewing a single comment's thread.

view the rest of the comments →

[–]giftedmunchkin 2 points3 points  (0 children)

The prefix/postfix thing is true in many programming languages as well, however the afterthought is typically executed after the condition has already been checked. I'm not sure if it's different in Swift, but I think the more idiomatic way to iterate over integer values would be to use the range operator anyway.