# What is the philosophy behind arrays not being copied when assigned to another variable?

**URL:** <https://discourse.julialang.org/t/what-is-the-philosophy-behind-arrays-not-being-copied-when-assigned-to-another-variable/98702>\
**Category:** New to Julia\
**Created:** [May 11, 2023, 10:24pm UTC](https://discourse.julialang.org/t/what-is-the-philosophy-behind-arrays-not-being-copied-when-assigned-to-another-variable/98702 "2023-05-11T22:24:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [May 12, 2023, 2:34am UTC](https://discourse.julialang.org/t/what-is-the-philosophy-behind-arrays-not-being-copied-when-assigned-to-another-variable/98702/5 "2023-05-12T02:34:11Z")

</div>

Two things.

1. There is a previous answer of mine that helps to internalize the memory model. On boxes vs labels: [Is it appropriate to say a variable is a label or box? - #19 by Henrique\_Becker](https://discourse.julialang.org/t/is-it-appropriate-to-say-a-variable-is-a-label-or-box/46068/19)
2. In C, you can have static-sized arrays and (mutable) structs that when assigned to a variable will copy the value to the variable because the variable is kinda guaranteed to be a memory space. However, any array with dimensions only known at runtime (and a lot of structs that have pointers stored) will have no-copy/shallow-copy problems a lot of times.

---

_[View the full topic](https://discourse.julialang.org/t/what-is-the-philosophy-behind-arrays-not-being-copied-when-assigned-to-another-variable/98702)._
