Discuss creation attributes

Vectornaut 2025-11-20 23:01:52 +00:00
parent ae440c4e8e
commit d803e54627

@ -186,3 +186,53 @@ It seems like this should assign the identifier `r` to the angle between `a` and
- Parentheses are a standard option - 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 - 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. - 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
```