Stephen DeStefano Swift 5 Course - Part 4 (Lectures 12 to 16)
Not going to go into rambling detail about how it's been a long time etc. End of term, start of holiday is always mental! I have missed my regular coding so am going to get some in today, then there will be more on Monday! I was working through Stephen's course, which was becoming pretty technical and challenging. Let's go! Start Time - 07:17 Stored Properties So these store constant/variable data. A key point here. Structs are value types - if you have a constant stored property, you cannot change the value. You can for classes as they are reference types. All that was pretty easy to be honest. Lazy Properties So I'm just trying to figure out the purpose of these! Stephen is quite rambling. OK so when the property is actually initialised, that's when the lazy stored property is accessed. It's about saving memory. So not created until it has actually been used. If it's computationally expensive - if it will end up slowing things down! Right...