# Understanding while loop UndedVarError and scope

**URL:** <https://discourse.julialang.org/t/understanding-while-loop-undedvarerror-and-scope/16609>\
**Category:** General Usage\
**Created:** [October 21, 2018, 7:07pm UTC](https://discourse.julialang.org/t/understanding-while-loop-undedvarerror-and-scope/16609 "2018-10-21T19:07:41Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![Vic](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@Vic](https://discourse.julialang.org/u/Vic)\
**Post date:** [October 23, 2018, 11:14pm UTC](https://discourse.julialang.org/t/understanding-while-loop-undedvarerror-and-scope/16609/27 "2018-10-23T23:14:10Z")

</div>

Actually, that reply [Understanding while loop UndedVarError and scope - #19 by Vic](https://discourse.julialang.org/t/understanding-while-loop-undedvarerror-and-scope/16609/19) was in the context where I argued that:  
One mutable object, once it has been mutated, it’s no longer “same” as before.

I meant “same” with respect to _intrinsic properties_ (values) that changed at mutating, not _identity_ (which is preserved, just like I’m still Vic even though this discussion has made me smarter ).

I should yet find time to read the paper you suggest.

For now, I’d say that programmatic indistinguishability (and `===`) is good for judging _identity_, but not _equality_ (compares values) of mutable objects.  
Plus, an object preserves it’s identity, but if mutated it changes in value, so I can’t say it remains _equal to itself_ across time.

LAST EDIT:  
in retrospect, I can see how the word “same” is better suitable for talking about identity of an object, not values. English is so ambiguous! So I misunderstood @kristoffer.carlsson with my reply here [Understanding while loop UndedVarError and scope - #19 by Vic](https://discourse.julialang.org/t/understanding-while-loop-undedvarerror-and-scope/16609/19) . 🤔  
😓

---

_[View the full topic](https://discourse.julialang.org/t/understanding-while-loop-undedvarerror-and-scope/16609)._
