From d803e546274f0d8a175f17bfe2dd4833c03d3f6a Mon Sep 17 00:00:00 2001 From: Vectornaut Date: Thu, 20 Nov 2025 23:01:52 +0000 Subject: [PATCH] Discuss creation attributes --- Command-language.md | 52 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/Command-language.md b/Command-language.md index e45afdb..3727d77 100644 --- a/Command-language.md +++ b/Command-language.md @@ -185,4 +185,54 @@ It seems like this should assign the identifier `r` to the angle between `a` and - To accommodate a flexible verb list, we'll almost certainly need some kind of separators to specify the tree structure. Polish notation won't cut it. - Parentheses are a standard option - Tcl uses [newlines and semicolons](https://www.tcl-lang.org/man/tcltutorial/html/Tcl1.html) to separate commands, whitespace to separate words within commands, and [double quotes](https://www.tcl-lang.org/man/tcltutorial/html/Tcl3.html) and [curly braces](https://www.tcl-lang.org/man/tcltutorial/html/Tcl4.html) for grouping -- Typically, parser generators can only handle the parts of the syntax that can be turned into parse tables at compile time. \ No newline at end of file +- Typically, parser generators can only handle the parts of the syntax that can be turned into parse tables at compile time. + +##### Creation attributes + +When creating an entity, one might want to elaborate on it by adjusting its parameters, manipulating related observables, or creating and setting related regulators. One way to do that would be through extra commands that are bundled together with the creation command, and which use the creation command as context. For example, the following might be equivalent: + +``` +s is Sphere + color = orange + Radius @ 2 +t is Sphere + color = purple + Radius @ 3 + Angle s @ unset +``` +``` +s is Sphere: color = orange, Radius @ 2 +t is Sphere: color = purple, Radius @ 3, Angle s @ unset +``` +``` +s is Sphere +s.color = orange +Radius s @ 2 +t is Sphere +t.color = purple +Radius t @ 3 +Angle s t @ unset +``` +Default regulators might be implemented as creation attributes, so that the following would be equivalent +``` +Sphere +``` +``` +Sphere + Radius @ unset +``` +and the following would also be equivalent +``` +Point +``` +``` +Point + X @ unset + Y @ unset + Z @ unset +``` +A boolean attribute called `bare` could be used to create an element without its default regulators. +``` +Sphere + bare +``` \ No newline at end of file