# Reference vs. Value Types in Swift | raywenderlich.com

**URL:** <https://forums.kodeco.com/t/reference-vs-value-types-in-swift-raywenderlich-com/60468>\
**Category:** 🎓 Courses & Articles\
**Created:** [January 23, 2019, 2:21pm UTC](https://forums.kodeco.com/t/reference-vs-value-types-in-swift-raywenderlich-com/60468 "2019-01-23T14:21:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecerney](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ecerney/32/87754_2.png) [@ecerney](https://forums.kodeco.com/u/ecerney)\
**Post date:** [January 23, 2019, 2:21pm UTC](https://forums.kodeco.com/t/reference-vs-value-types-in-swift-raywenderlich-com/60468/1 "2019-01-23T14:21:21Z")

</div>

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](https://www.raywenderlich.com/9481-reference-vs-value-types-in-swift)

---

<div class="post-metadata">

**Author:** ![sahitya8e7](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sahitya8e7/32/81494_2.png) [@sahitya8e7](https://forums.kodeco.com/u/sahitya8e7)\
**Post date:** [July 1, 2019, 6:59pm UTC](https://forums.kodeco.com/t/reference-vs-value-types-in-swift-raywenderlich-com/60468/3 "2019-07-01T18:59:14Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [August 21, 2019, 10:12pm UTC](https://forums.kodeco.com/t/reference-vs-value-types-in-swift-raywenderlich-com/60468/4 "2019-08-21T22:12:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [September 6, 2019, 4:34pm UTC](https://forums.kodeco.com/t/reference-vs-value-types-in-swift-raywenderlich-com/60468/5 "2019-09-06T16:34:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [September 6, 2019, 4:34pm UTC](https://forums.kodeco.com/t/reference-vs-value-types-in-swift-raywenderlich-com/60468/6 "2019-09-06T16:34:53Z")

</div>

Closed on September 6, 2019, 4:34pm UTC


