Learning SwiftUI - Day 4 of 100

Loops, loops, and more loops.

Again, the basics are the same here. Three stark differences I noticed. There’s no difference in Swift between for and foreach loops—it’s just for loops. Then there’s the delightful _ syntax for when you don’t need to use the variable defined. Lovely.

The second difference was being able to give loops names for nested loop scenarios. Seems genius to me, though I can’t remember the last time I needed a nested loop.

The third difference is in the infinite looping section. Before now, I would have done everything in my power to avoid infinite loops. Interesting. I’ll have to see what comes of this.

Anyway. It was a quick one today.

4 March 2021 100-days-of-swiftui development


Previous post
Going Down the Stream Deck Rabbit Hole Lately, I’ve been fiddling with time-tracking my life. Mostly my work life so far, but I’m horribly inconsistent about it. I bought some NFC tag
Next post
Learning SwiftUI - Day 5 of 100 We’re getting into things I haven’t seen before, or haven’t had to know previously, and it’s rather fun. Having two names for a parameter seems