Expression Bodies (Command Chaining)
Propose the two commands
mul x y
set-hp val
With command chaining you would be able to do
set-hp mul(5 20)
Whilst the specific syntax is just a proposal, the overall idea is that commands should be able to be chained, so that the output of one can be used as the input of another. This could allow very powerful constructs
Naturally, type checking and error handling will need to be performed for the data passing
Comments (9)
-
reporter -
reporter - changed status to open
Expression bodies are now functional, however they do not yet work for recursive inner arguments
For example
sort<int> [1, {expr}, 2]
will fail
-
reporter -
assigned issue to
-
assigned issue to
-
reporter Expression bodies now disallow null values, unless specified as nullable with
{expr}?
Non-nullable expression bodies will complain if the resulting value is null
-
reporter Expression bodies do not yet work when the type can be converted but is not directly assignable. i.e `{expr}` returns an
int
, but the command expects afloat
will be incorrectly recorded as incompatible -
reporter Type compatibility is now properly fixed. The only (known) issue remaining is when the expr body is encountered in some kind of nested object (such as an array. An expression body containing other expression bodies works fine)
-
reporter - changed title to Expression Bodies (Command Chaining)
-
reporter This is now fully supported, and along side boolean negation is implemented using the new
IQcGrammarConstruct
system -
reporter - changed status to resolved
Finished for V2.3.0
- Log in to comment
Another syntax proposal would be a much more explicit expression body style