Value & Reference Types in Swift: Lots to Learn — But Easy to Use

Yakov Manshin
The Swift Bird
Published in
Apr 5, 2024

The new video in my Swift & iOS Basics series is about Swift’s value and reference types. While most languages have both categories just as well, they really push you toward reference types.

Swift is not like those languages: It makes value types much more powerful. But now that you have two equally versatile tools — structures and classes — it’s helpful to have an idea about their nuances.

In the video, I mostly focus on structures and classes — because you can compare them directly. But don’t forget you’ve got quite a few other data types: enumerations, tuples, actors, closures, etc.

--

--