aboutsummaryrefslogtreecommitdiff
path: root/CHANGES.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-10-11 15:50:19 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-10-11 15:50:19 -0400
commit436d2e02debe058e9968935e742e397c19de628a (patch)
treec51d08a586ead5c4f22d3f2d12695c4a7cf6cbca /CHANGES.md
parent7e8604daeb9239e1669c5414dd6caa37af30c4ff (diff)
Improvements to set support and updating docs
Diffstat (limited to 'CHANGES.md')
-rw-r--r--CHANGES.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES.md b/CHANGES.md
index fd51056e..f84c3af8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -12,8 +12,11 @@
- Syntax for tables has changed to use colons (`{k: v}`) instead of equals
(`{k=v}`).
- Deprecated:
- - Sets
- - Instead of sets, use tables.
+ - Sets are no longer a separate type with separate methods.
+ - Instead of sets, use tables with a value type of `{KeyType:Empty}`.
+ - As a shorthand, you can use `{a,b,c}` instead of `{a:Empty(),
+ b:Empty(), c:Empty()}` and the type annotation `{K}` as shorthand for
+ `{K:Empty}`.
- Tables now have `and`, `or`, `xor`, and `-` (minus) metamethods.
- `extern` keyword for declaring external symbols from C.
- Use `C_code` instead.
@@ -31,6 +34,8 @@
`table.intersection(other)`, and `table.difference(other)`.
- Added `Empty` for a built-in empty struct type and `EMPTY` for an instance of
the empty struct.
+- Changed `list.unique()` to return a table with `Empty()` values for each
+ unique list item.
- Added a `--format` flag to the `tomo` binary that autoformats your code
(currently unstable, do not rely on it just yet).
- Standardized text methods for Unicode encodings: