RX0722

Domain: Parsing

Error message

a write onto a copy of a holder: %s

In the message, %s marks a value that the engine fills in when it raises the error.

The story

Here is a trap that catches careful programmers, and the engine catches it for you. You wrote h equals tables dot k, and later you wrote into h. It looks like you are writing into the table. You are not. A bind makes a new cell. So h holds the value of the holder as it was when you bound it, a copy, and not the holder itself. If a write door were allowed to use h, it would rebind h and leave the real holder untouched. Your write would land nowhere, silently, and your data would not change. That would be a nasty bug, so the engine refuses at parse time, before anything runs. It also tells you the right spelling: write directly onto the holder, with the full path, such as data put, tables, bracket k. Reading through h is perfectly fine, because reading a value is harmless. Only writing needs the real address. The message names the door, the name you used, and the fix. Copy the fix, run again, and the write lands where you meant it.

Text from the Rush engine's error catalogue.