# I'm not sure I understand write\_canonical/1 anymore

**URL:** <https://swi-prolog.discourse.group/t/im-not-sure-i-understand-write-canonical-1-anymore/2165>\
**Category:** General\
**Created:** [April 14, 2020, 6:43am UTC](https://swi-prolog.discourse.group/t/im-not-sure-i-understand-write-canonical-1-anymore/2165 "2020-04-14T06:43:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttmrichter](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/ttmrichter/32/4954_2.png) [@ttmrichter](https://swi-prolog.discourse.group/u/ttmrichter)\
**Post date:** [April 14, 2020, 6:43am UTC](https://swi-prolog.discourse.group/t/im-not-sure-i-understand-write-canonical-1-anymore/2165/1 "2020-04-14T06:43:24Z")

</div>

```prolog
?- X = A{}, write_canonical(X).
_{}
X = A{}.

?- X = A{}, A = {}, write_canonical(X).
{}{}
X = {}{},
A = {}.

?- X = A{}, A = {}, write_canonical(X), X = {}{}.
ERROR: Syntax error: Operator expected
ERROR: X = A{}, A = {}, write_canonical(X), X = {
ERROR: **here**
ERROR: }{} . 
?- 

```

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [April 14, 2020, 7:03am UTC](https://swi-prolog.discourse.group/t/im-not-sure-i-understand-write-canonical-1-anymore/2165/2 "2020-04-14T07:03:10Z")

</div>

Dict tags are meant to be atoms or unbound. As is, you can create terms that cannot be read by creating a dict using a variable tag and binding it to something that is not an atom. I don’t think it is that much of a problem. The introduction of cyclic terms already broke fully transparent read/write of arbitrary Prolog terms. SWI-Prolog’s blobs added one more issue and this is number three 🙂
