From 9c51803b290fd2778d9db0f519282517567b2237 Mon Sep 17 00:00:00 2001 From: Vectornaut Date: Thu, 13 Nov 2025 23:10:22 +0000 Subject: [PATCH] Clarify syntax options; mention interactive help advantage of `named` --- Command-language.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Command-language.md b/Command-language.md index c86a559..2d11ffc 100644 --- a/Command-language.md +++ b/Command-language.md @@ -32,10 +32,10 @@ We could make regulator references more visually coherent, and help distinguish #### Creating regulators +_Syntax options_ ``` Angle a b ``` - ``` regulate Angle a b ``` @@ -64,6 +64,7 @@ Angle a b @ 30 Set the regulator for the angle between `a` and `b` to 30°, creating the regulator if it doesn’t already exist. +_Syntax options_ ``` unset Angle a b ``` @@ -77,6 +78,7 @@ Unset the regulator for the angle between `a` and `b`. #### Assigning identifiers +_Syntax options_ ``` a is Sphere ``` @@ -84,8 +86,9 @@ a is Sphere Sphere named a ``` -Create a sphere, as described above, and set its identifier to `a`. +Create a sphere, as described above, and set its identifier to `a`. The `is` option follows the strong tradition of putting identifiers on the left, but the `named` option might work better with an interactive help system. +_Syntax options_ ``` r is Angle a b ``` @@ -95,6 +98,7 @@ Angle a b named r Assign the identifier `r` to the regulator for the angle between `a` and `b`, creating the regulator if it doesn’t exist already. +_Syntax options_ ``` a is c ``` @@ -106,6 +110,7 @@ Assign the a new identifier, `a`, to the object with the identifier `c`. #### Nesting identifier assignments +_Syntax options_ ``` r is Angle a b is Sphere ``` @@ -118,6 +123,4 @@ It seems like this should assign the identifier `r` to the angle between `a` and - If the language has both statements and expressions, `is` could be a statement, and thus syntactically inadmissible for nesting. - If the language is purely expression-based: - An `is` expression could return unit, making it semantically inadmissible for nesting. - - An `is` expression could require punctuation for nesting. - -The `is` option follows the strong tradition of putting identifiers on the left. \ No newline at end of file + - An `is` expression could require punctuation for nesting. \ No newline at end of file