mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-03 18:10:56 +01:00
Add symbol rename example
This commit is contained in:
parent
c7cae19195
commit
4dda9ef842
1 changed files with 3 additions and 1 deletions
|
@ -115,7 +115,9 @@ This proposal does not preclude supporting arrays, nested matching or non-string
|
|||
|
||||
Using a symbol like `=` or `:` for renaming was considered, but was rejected because it was ambiguous whether the left hand side was the key, or the right hand side. By contrast, a keyword like `as` naturally implies an order.
|
||||
|
||||
|
||||
```Lua
|
||||
local { foo = red, bar = blue } = data
|
||||
```
|
||||
|
||||
#### Dot keys
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue