# Why not "hello" === "hello"?

**URL:** <https://discourse.julialang.org/t/why-not-hello-hello/4903>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 17, 2017, 2:23pm UTC](https://discourse.julialang.org/t/why-not-hello-hello/4903 "2017-07-17T14:23:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [July 17, 2017, 2:23pm UTC](https://discourse.julialang.org/t/why-not-hello-hello/4903/1 "2017-07-17T14:23:01Z")

</div>

I understand that strings are implemented as mutable types. But from a user’s perspective, strings are values, like integers are. Currently `"hello" === "hello"` returns false, but if it returned true, then things like these:

> [@Surprising struct equality test](https://discourse.julialang.org/t/surprising-struct-equality-test/4890/16):
>
> Strings are for implementation reasons defined as a mutable struct and therefore use object equality for ===.

would be automatically fixed.

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [July 17, 2017, 2:32pm UTC](https://discourse.julialang.org/t/why-not-hello-hello/4903/2 "2017-07-17T14:32:59Z")

</div>

> [@e3c6](#):
>
> implemented as mutable types

That’s why. I might be fixed in the future but it has never been the case so no one should be relying on it.

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [July 17, 2017, 2:35pm UTC](https://discourse.julialang.org/t/why-not-hello-hello/4903/3 "2017-07-17T14:35:20Z")

</div>

Also, it’ll not be an automatic fix. The generic fix is still [https://github.com/JuliaLang/julia/issues/4648](https://github.com/JuliaLang/julia/issues/4648)

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [July 17, 2017, 2:53pm UTC](https://discourse.julialang.org/t/why-not-hello-hello/4903/4 "2017-07-17T14:53:24Z")

</div>

You mean that a “patch” cannot be made for strings, so that `===` deviates from its general behavior and actually does the same as `==`, only for strings?
