# Add deepcopy operator := to avoid bugs

**URL:** <https://discourse.julialang.org/t/add-deepcopy-operator-to-avoid-bugs/70793>\
**Category:** General Usage\
**Tags:** suggestions, syntax, deepcopy\
**Created:** [November 2, 2021, 10:09am UTC](https://discourse.julialang.org/t/add-deepcopy-operator-to-avoid-bugs/70793 "2021-11-02T10:09:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [November 2, 2021, 10:24am UTC](https://discourse.julialang.org/t/add-deepcopy-operator-to-avoid-bugs/70793/2 "2021-11-02T10:24:35Z")

</div>

> [@martin.demare](#):
>
> One of my reoccurring bugs is that I forget that ` z=x` doesn’t create a copy of `x` if `x` is an array.

An assignment _never_ copies, not for any type. It _always_ rebinds the name `z` to point to the same thing that `x` binds (i.e. refers) to. If you’re thinking of something like `z = x[1:3]` and how that copies - it’s the `x[1:3]` part (the _slice_) that copies, not the assignment.

Also, your suggestion about `:` would change julia quite a lot - note that we’re not necessarily at that stage of development anymore.

> [@PSA: Julia is not at that stage of development anymore](https://discourse.julialang.org/t/topic/44872/1):
>
> You heard about this brand new exciting programming language called Julia and have some suggestions for how it should work. Wonderful! We’re happy to have you here and help you learn the language and listen to your ideas! However, please be aware that “new” is a relative term. Yes, Julia is newer than, say, C, which was first created in 1972 and standardized in 1989. It is not, however, new in the sense that it is still being freely designed and changed in arbitrary ways. Julia development start…

---

_[View the full topic](https://discourse.julialang.org/t/add-deepcopy-operator-to-avoid-bugs/70793)._
