# Why the variable is not modified inside a function with suffix "!"

**URL:** <https://discourse.julialang.org/t/why-the-variable-is-not-modified-inside-a-function-with-suffix/62581>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 8, 2021, 1:37pm UTC](https://discourse.julialang.org/t/why-the-variable-is-not-modified-inside-a-function-with-suffix/62581 "2021-06-08T13:37:05Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [June 8, 2021, 2:21pm UTC](https://discourse.julialang.org/t/why-the-variable-is-not-modified-inside-a-function-with-suffix/62581/8 "2021-06-08T14:21:32Z")

</div>

About the difference between bindings and modifying mutable objects, there were many questions about it here in this forum, I selected some of my previous answers:

> [@When will the original value be changed with the copied value?](https://discourse.julialang.org/t/when-will-the-original-value-be-changed-with-the-copied-value/37810/6):
>
> I did not find the specific section of the manual that explains this, so I will try to explain it myself (but I am almost sure such section exists). The problem I see is that your mental model on how variables and objects work is not how they work in Julia (but I am sure in other languages you would see the behavior you did expect). In Julia, a variable is just a name for some value in some scope. When you attribute a value to some variable you are never copying it, you are binding it, this is…

> [@Does splatting create a shallow copy?](https://discourse.julialang.org/t/does-splatting-create-a-shallow-copy/55566/8):
>
> A wise decision. In practice things happens as you describe, but there is also a fundamental misunderstanding here: copy is blind to the inner elements, it does not take different decisions based on the type of the inner elements, it always do the same thing: copying a reference to the element. “But what about Ints”, you may say, “they are copied by value” or yet, “changes I make to them do not reflect in the original array”. To that I have two answers: “changes I make to them do not refle…

---

_[View the full topic](https://discourse.julialang.org/t/why-the-variable-is-not-modified-inside-a-function-with-suffix/62581)._
