on master help sign in
lustar alias -> deferred expression
b24ebcddrbeefsupreme
content/docs/hoon/reference/rune/lus.md+17−12
@@ -135,7 +135,7 @@ Any Hoon expression, `q`, may be used to define the arm computation.
135
135
136### `+*` "lustar"
136### `+*` "lustar"
137
137
138−Defines aliases within doors.
138+Defines deferred expressions within doors.
139
139
140##### Syntax
140##### Syntax
141
141
@@ -148,23 +148,28 @@ Regular: **variadic**.
148 e=term f=hoon
148 e=term f=hoon
149```
149```
150
150
151−`a`, `c`, `e` are arm names and `b`, `d`, `f` are any Hoon expression. Note that unlike all other
151+`a`, `c`, `e` are arm names and `b`, `d`, `f` are any Hoon expression. Note that
152−runes with a variable number of arguments, the list of arguments of `+*` does
152+unlike all other runes with a variable number of arguments, the list of
153−not end with a terminator.
153+arguments of `+*` does not end with a terminator.
154
154
155`+*` arms must always come at the beginning of the battery, before any other
155`+*` arms must always come at the beginning of the battery, before any other
156type of lus arm.
156type of lus arm.
157
157
158##### Discussion
158##### Discussion
159
159
160−The primary use of `+*` is to create aliases within doors (see Examples below).
160+The primary use of `+*` is to create deferred expressions within doors (see
161+Examples below). This is a name for an expressions that will be evaluated in
162+each place the name is dereferenced. This is a similar concept to aliases or
163+macros, but there are some subtle but important differences. Deferred
161−Aliases given by `+*` do not count towards the number of arms in the door and
164+expressions given by `+*` do not count towards the number of arms in the door
162−thus are also called "virtual arms", which
165+and thus are also called "virtual arms", which can be important for things like
163−can be important for things like Gall app cores that require a fixed number of arms.
166+Gall agent cores that require a fixed number of arms.
164−
167+
165−Under the hood, `+*` gets compiled as `=*`'s. `+* foo bar` rewrites each `++`
168+Under the hood, `+*` gets compiled as
169+[`=*`'s](/docs/hoon/reference/rune/tis#tistar) (see here for more discussion on
166−arm beneath it in the core to include
170+deferred expressions). `+* foo bar` rewrites each `++` arm beneath it in the
167−`=* foo bar`. For example, the interpreter sees the Nock compiled from this Hoon expression
171+core to include `=* foo bar`. For example, the interpreter sees the Nock
172+compiled from this Hoon expression
168
173
169```hoon
174```hoon
170|_ z=@ud
175|_ z=@ud
content/docs/hoon/reference/rune/tis.md+1−1
@@ -421,7 +421,7 @@ Regular: **running**.
4213
4213
422```
422```
423
423
424−### `=*` "tistar"
424+### `=*` "tistar" {#tistar}
425
425
426`[%tstr p=term q=hoon r=hoon]`: define a deferred expression.
426`[%tstr p=term q=hoon r=hoon]`: define a deferred expression.
427
427
lib/glossary.js+1−1
@@ -425,7 +425,7 @@ export const glossary = [
425 symbol: "+*",
425 symbol: "+*",
426 usage: "Arms",
426 usage: "Arms",
427 slug: "/docs/hoon/reference/rune/lus/#-lustar",
427 slug: "/docs/hoon/reference/rune/lus/#-lustar",
428− desc: "Produce a type constructor arm.",
428+ desc: "Produce a deferred expression arm.",
429 },
429 },
430 {
430 {
431 name: "col",
431 name: "col",