Day 9

100 Days of SwiftUI

Rewatched the videos from 100 Days of SwiftUI Day 8 and Day 9.

Also spent some time reading the Swift documentation for Classes and Structures.

Structures are Value Types. A value type is a type whose value is copied when it’s assigned to a variable or constant, or when it’s passed to a function.

Paul Hudson touched on this in the videos. From the offical documentation.

You’ve actually been using value types extensively throughout the previous chapters. In fact, all of the basic types in Swift—integers, floating-point numbers, Booleans, strings, arrays and dictionaries—are value types, and are implemented as structures behind the scenes.

Tomorrow is Classes so I will compare and contrast some of the differences.