De-emphasize deprecated |-operator in docs and examples

This commit is contained in:
Ruud van Asseldonk 2025-11-22 21:41:39 +01:00
parent 1c099f84c6
commit 3008b99b41
4 changed files with 5 additions and 5 deletions

View file

@ -22,9 +22,8 @@ Language:
* Add [unpack](syntax.md#unpack): `..` and `...` syntax that can be used inside
lists, sets, and dicts to unpack one collection into another.
* Unpack can be used to express dict and set unions without the need for
the `|` operator. As such, the `|` operator is now deprecated, and will
be removed in a future version.
* The `|` operator is now deprecated, and will be removed in a future version.
The new unpack feature can be used to express dict and set unions instead.
* [Assertions](syntax.md#assertions) now use a `:` to separate the condition
and the message: `assert cond: "message";` rather than
`assert cond, "message";`. For compatibility, <abbr>RCL</abbr> still accepts

View file

@ -290,7 +290,6 @@ Binary operators that operate between two expressions, e.g. `x and y`:
| `<=` | Less than or equal to |
| `>` | Greater than |
| `>=` | Greater than or equal to |
| `|` | Set or dict union, right-biased for dicts |
| `+` | Numeric addition |
| `-` | Numeric subtraction |
| `*` | Numeric multiplication |

View file

@ -16,6 +16,8 @@ to handle optional keys gracefully.
## Union operator
**This operator is deprecated.** Use [unpack](#union) instead.
The `|` operator returns the union of two dictionaries. When a key occurs on
both sides, the value is taken from the right side.

View file

@ -48,6 +48,6 @@ let var = {
for tag in tags:
tag
};
host: group_tags | device_tags
host: { ..group_tags, ..device_tags }
},
}