RX0505

Domain: Parsing

Error message

a retired builtin: %s (%s)

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

The story

You used insert, and rush told you that this word is retired. Let's see why. In rush, changing a collection is a serious act, so there is one door for it, and one door only: data dot something. Direct mutation builtins, the ones that reach into a list and change it on the spot, were refused outright in favor of that single door. With one door, every change goes the same way: it is recorded, it creates a new version, and it can be read back later in time. Insert was one of those direct builtins. So rush refuses it, by name, and not with a vague not found. The replacement is data dot add. Give it the list, and the value, and it produces the next version of your collection with the value added. For example, data dot add of xs and v. Your original version stays in the history. And if you had written your own function called insert, yours still wins. One door, one habit, and your data stays honest.

Text from the Rush engine's error catalogue.