With closures in the rear view mirror, it was time for something different today – structs. Definitely more straightforward than closures, but a tired brain still tripped me up on the post-lesson questions. Definitely more wrong answers tonight than any previous night – got caught up multiple times on let
vs var
. Sure would be helpful to have Xcode flag that stuff for me!
Overall, I think this lesson felt better than some of the other recent ones because it offered me a combination of new things as well as some more practical examples. It’s quite easy to see how structs work in the real world because a) I’ve had some exposure to them before and b) the last two examples for the day showed them in action on both strings and arrays.