Struct vs Classes in Swift: The Differences Explained

When should you use a struct and when should you go for a class?

Antoine van der lee 🇳🇱
Better Programming
Published in
4 min readAug 27, 2019

--

Photo by Max Nelson on Unsplash

Cannot assign to property: function call returns immutable value

You’re probably not the first to fall back to changing your type to a class when an error like the above occurs, as structs tend to be…

--

--

iOS Developer @WeTransfer — Follow me on twitter.com/twannl for more tips & tricks — Blogging weekly at https://avanderlee.com — Clap & hold for a surprise!