To correctly implement the && method being shortcircuit in the wollok.lang.Boolean class we need some sort of built-in mechanism in the language itself for modelling lazily evaluated parameters.
method and(lazy other) { .... }
and then when used
true.and(calculateSomething())
the "other" value will be calculated by interpreting "calculateSomething())" only upon the first usage in the method body
Still we need to implement the "and" operation as a native method in this case, since it is a really low level operation, but currently the interpreter is sending an xtend closure to the method as parameter which is basically like a "future".
To correctly implement the && method being shortcircuit in the wollok.lang.Boolean class we need some sort of built-in mechanism in the language itself for modelling lazily evaluated parameters.
and then when used
the "other" value will be calculated by interpreting "calculateSomething())" only upon the first usage in the method body
Still we need to implement the "and" operation as a native method in this case, since it is a really low level operation, but currently the interpreter is sending an xtend closure to the method as parameter which is basically like a "future".