WatchKit-by-Tutorials icon indicating copy to clipboard operation
WatchKit-by-Tutorials copied to clipboard

Using enumerate instead of for i loop.

Open mmorey opened this issue 10 years ago • 3 comments

@rnystrom are you open to style changes? For example, I find enumerate to be easier to read than the for var i version.

If you do like the enumerate method I can update the other for loops where it makes sense.

I'll let you/team decide.

mmorey avatar Dec 05 '14 00:12 mmorey

@rnystrom Could you please get back to @mmorey on this one? My vote would be to use enumerate as it's very Swift-like and is easy to read.

ghost avatar Jan 21 '15 09:01 ghost

Just realised that I was looking at the wrong fork. However, this is still worth considering if it hasn't been already :+1:

ghost avatar Jan 21 '15 09:01 ghost

Ya we merged this one in :)

However I'm glad you commented on this b/c there are a couple other instances of for var in my projects that need updating. Good catch!

rnystrom avatar Jan 21 '15 18:01 rnystrom