Branch
Hash :
859f99a0
Author :
Date :
2022-08-05T14:25:30
example.b
{nā7}.n
----------------------------------------------------
[
["dot-notation-on-name", "example."],
["word-name", "b"],
["dot-notation-on-brackets", "{"],
["word-name", "n"],
["punctuation", "ā"],
["word-number", "7"],
["dot-notation-on-brackets", "}."],
["word-name", "n"]
]
----------------------------------------------------
A namespace is a type of value that groups together several variables
(fields) from the same scope. A block or file returns a namespace if it
contains any export arrows ā at the top level, and fields from namespaces can
be accessed with either dot syntax or destructuring assignment. A namespace
can be mutable only if any of its source code uses ā© to change the value of a
field.
There are also two ways to get values out of a namespace, such as example
defined above. First, one field at a time can be retrieved with dot syntax:
write the namespace, then a dot ., then another name.
The second, destructuring assignments, does not require special highlighting.