# Why to assign a lot of variants to one array? (Basic syntax)

**URL:** <https://discourse.julialang.org/t/why-to-assign-a-lot-of-variants-to-one-array-basic-syntax/30253>\
**Category:** General Usage\
**Tags:** proposal\
**Created:** [October 24, 2019, 12:25am UTC](https://discourse.julialang.org/t/why-to-assign-a-lot-of-variants-to-one-array-basic-syntax/30253 "2019-10-24T00:25:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yan](https://avatars.discourse-cdn.com/v4/letter/y/3e96dc/32.png) [@Yan](https://discourse.julialang.org/u/Yan)\
**Post date:** [October 24, 2019, 12:25am UTC](https://discourse.julialang.org/t/why-to-assign-a-lot-of-variants-to-one-array-basic-syntax/30253/1 "2019-10-24T00:25:05Z")

</div>

a=b=c=[0]  
x=y=z=0

Why producing different meanings behind a similar basic syntax? despite one for immutable, another for mutable.

---

<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:** [October 24, 2019, 12:40am UTC](https://discourse.julialang.org/t/why-to-assign-a-lot-of-variants-to-one-array-basic-syntax/30253/2 "2019-10-24T00:40:02Z")

</div>

What’s “assign a lot of variants to one array”? Do you mean assigning one array to multiple variables?

Because that’s exactly what the syntax mean? You are literally assigning one array to multiple variables, as in, there’s one array on the RHS and multiple variables on the LHS.

> [@Yan](#):
>
> Why producing different meanings behind a similar basic syntax? despite one for immutable, another for mutable.

They are producing **the same result** since they have **the same meaning** being exactly the **same** syntax. There’s absolutely no difference. In particular, anything you can do with `x`, `y`, `z` in terms of their identity, equality and mutatiton are exactly reproducible with `a`, `b` and `c`. The other way around isn’t fully true but that’s because you couldn’t mutate `a`, `b` or `c`.
