Reference vs. Value Types in Swift | raywenderlich.com

Learn the subtle, but important, differences between reference and value types in Swift by working through a real-world problem.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/9481-reference-vs-value-types-in-swift

This post was great and helped me clarify the differences between the two.
I do have a couple questions:

  1. We know that in Swift, Value types are preferred over reference types. But Why?
  2. The amount of code that we have written to use a reference type variable is a lot more than if we were to use reference type objects. Then why go to the trouble of writing all that code?

@adamrush Can you please help with this when you get a chance? Thank you - much appreciated! :]

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!