MiranDMC
MiranDMC
> > How condition result will be handled? Your earlier idea with `return` and `not return` seems nice. Possibility to use variable as condition result should also be a thing....
Um I really don't like fact that `return false` would behave differently than other cases, and what is situation where function is supposed to return one bool param? Syntax is...
_Currently there is no such thing as bool type. Will it be reserved for condition result only? It might be good idea do declare if function sets condition state or...
> Many functions are just calculations and they don't need to work with condition at all. Then it simply just returns single argument (for example float). If used in condition...
What do you mean with opcodes? I posted examples above. ``` func test() : (int, string, float) (...) return(true, "result", 3.0) end test() // allowed, discard return all return values...
Mentioned `_` is just next feature proposition inspired on what recent C++ language received. It is possible to store multiple returns in similar fashion you proposed, where `_` is often...
``` :test (...) 0AB2: cleo_return args 3 true "result" 3.0 // set CLEO condition result based on arg[0] 0AB1: @test args 0 if 0AB1: @test args 0 then (...) end...
1. I propose to add support of discarding all return values of 0AB2. So there should be accepted scenarios where all parameters are used, or none. If any other prams...
``` :test (...) 0AB2: cleo_return args 4 1 2 3 4 cleo_call @test args 0 // this is not possible now ``` Yep, legacy behaviour of 0AB2 is untouchable then.
Sounds reasonable. I have some functions that return both condition result false and values, like obtaining entity where for failed case returned handle is -1. I guess with new return...