# Does SWI-Prolog do variable aliasing?

**URL:** <https://swi-prolog.discourse.group/t/does-swi-prolog-do-variable-aliasing/1416>\
**Category:** Help!\
**Created:** [October 21, 2019, 9:56pm UTC](https://swi-prolog.discourse.group/t/does-swi-prolog-do-variable-aliasing/1416 "2019-10-21T21:56:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [October 21, 2019, 10:16pm UTC](https://swi-prolog.discourse.group/t/does-swi-prolog-do-variable-aliasing/1416/2 "2019-10-21T22:16:22Z")

</div>

> [@vultan](#):
>
> Is SWI-Prolog doing some kind of variable aliasing as an optimization?

[Variable aliasing](https://en.wikipedia.org/wiki/Aliasing_(computing))? No, because the variables are [immutable](https://en.wikipedia.org/wiki/Immutable_object).

Unification? Yes, Prolog uses [syntactic unification](https://en.wikipedia.org/wiki/Unification_(computer_science)#Syntactic_unification_of_first-order_terms)

See this [answer](https://swi-prolog.discourse.group/t/mystery-unification/929/2) for more details.

---

_[View the full topic](https://swi-prolog.discourse.group/t/does-swi-prolog-do-variable-aliasing/1416)._
