Community
Participate
Working Groups
We need to support short circuit evaluation of boolean operators. Unfortunately, this has to be baked into the language.
*** Bug 342359 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > We need to support short circuit evaluation of boolean operators. > Unfortunately, this has to be baked into the language. An alternative would be to use annotations or some other kind of mapping information from extension methods to compiler / interpreter strategies, e.g. class BooleanExtension { @CompileStrategy(BooleanCompiler.class) @InterpreterStrategy(BooleanInterpreter.class) boolean operator_and(boolean left, boolean right) { return left && right; } } This would allow to create more intuitive code for other extensions, too, e.g. class IntExtension { int operator_plus(int left, int right) { return left + right; } } could be compiled to result = left + right;
I don't think it is worth the added complexity. At least for Indigo we should simply hard code the special boolean case into the compiler and interpreter.
*** Bug 342577 has been marked as a duplicate of this bug. ***
pushed to master
Closing all bugs that were set to RESOLVED before Neon.0