diff options
-rw-r--r-- | txr.1 | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -23278,9 +23278,9 @@ once. .desc The .code qref -macro performs structure slot access. Structure slot access is more -conveniently expressed using the referencing dot notation, which works -by translating to qref +macro ("quoted reference") performs structure slot access. Structure slot +access is more conveniently expressed using the referencing dot notation, which +works by translating to qref .code qref syntax, according to the following equivalence: @@ -23327,7 +23327,7 @@ following equivalence applies: (qref o n) <--> (slot o 'n) .cble -Where +where .code slot is the structure slot accessor function. Because .code slot @@ -23336,6 +23336,11 @@ slots can be modified via assignment to the .code qref form and the referencing dot syntax. +The slot name being implicitly quoted is the basis of the term +"quoted reference", giving rise to the +.code qref +name. + A compound designator indicates that the named slot is a function, and arguments are to be applied to it. The following equivalence applies in this case, except that @@ -23394,8 +23399,8 @@ leftmost argument, so that the function has access to the object. .desc The .code uref -macro expands to an expression which evaluates to a function. -The function takes exactly one argument: an object. +macro ("unbound reference") expands to an expression which evaluates to a +function. The function takes exactly one argument: an object. When the function is invoked on an object, it references slots or methods relative to that object. @@ -23433,6 +23438,12 @@ argument is present, these equivalences also hold: (uref s) <--> (usl s) .cble +The terminology "unbound reference" refers to the property that +.code uref +expressions produce a function which isn't bound to a structure +object. The function binds a slot or method; the call to that function then +binds an object to that function, as an argument. + .TP* Examples: Suppose that the objects in |