Hi,
I'm trying to understand how much lazy evaluation is allowed to be but the spec isn't clear on this. Since there is no mention of evaluation order for the operational semantics I'm assuming that arbitrary reductions are allowed. This doesn't help with native functions like std.filter though. Take this program:
std.filter(function(x) x == 1, [1, std.assertEqual(1,2)])[0]
This fails with "RUNTIME ERROR: Assertion failed. 1 != 2" in the standard jsonnet interpreter. Is it required to fail? Or can the interpreter skip evaluation of array elements that are not required for the result?