Support long immutable tables
Author: Marco-SullaCreated Sep 30, 2025Updated Sep 30, 2025
From version 1.0, inline tables are immutable. So if you want to create an immutable table, the table can't be too much long, since actually inline tables doesn't allow newlines and trailing commas.
You can implement long immutable tables:
allowing newlines and trailing comma also in inline tables. pro: consistency with normal tables con: the table will be no more "inline", so in theory you should rename them
Make it possible to create immutable "normal" tables. The problem is: how? Magic comment? Magic assignement, like
my_table = immutable? Maybe with[mytable immutable=true]? Is this a Pandora vase?Something completely different. Let's bike.
Source: astral-sh/rye