100 Days of SwiftUI — Day 9

Ninth day of a hundred, ninth blogpost. I guess, you know the drill.

Todays topic was structs again. Paul explained memberwise initialzers, access control — public and private — and lazy and static properties. I learned, that when you have a struct with at least one private property, you're forced to write your own initializers, as you can't rely on the generated, memberwise initializer to initialize all values. Well, at least, as long as you don't provide default values for these private properties.

When you think about it, this totally makes sense. Also, for the first time, Paul provided lots of useful and intersting additional information, like What’s the point of access control?

I'm getting used to attending this course daily. Oh, and it's fun! Thank you, Paul.