Classes and Structs
Both classes and structs are the main building blocks of most applications.
They help us organize our code into pieces that we can reason about more
intuitively and with greater ease. Today, we’ll go over how classes and
structs behave differently from each other, and finish off by starting to
think about when to use a class vs. when to use a struct.
I highly recommend downloading the Playground or cloning the repo to follow
along.
Let’s get started. ⚡️
Classes
Classes allow us to model