| ▲ | dhamidi 16 hours ago | |
Maybe useful inspiration from TCL: there are many commands that define new variables, which makes modeling the stack unnecessary. For example:
Appends a new dict to the list held in the variable responses, creating the variable if necessary.I can see that being an attribute: | ||
| ▲ | lassejansen 16 hours ago | parent [-] | |
The main reason for using a stack was reducing verbosity because for short scripts using variables felt unnecessary when the type-prefix of the command already communicates the variable contents. But it could still be a good idea to have a shorter syntax for assigned variables. Accessing a variables works like this at the moment:
Keeping the dollar syntax, setting the return value to a named variable could look like this: | ||