Hi there! Just a quick post to announce a bugfix release of the ABS programming language: 1.3.2 fixes a simple yet important performance bug dealing with short-circuit evaluation.
Short-circuiting is the amazing property some languages assign
to boolean operators (eg.
||): if the first parameter
in the expression is sufficient to determine the end value of
the expression, the second value is not evaluated at all.
Take a look at this example:
You wouldn’t expect the script to
sleep since the first parameter
in the expression is already falsy, thus the expression can never be
Same thing, easy peasy.
Even more important, short-circuiting can be really useful in order to access a property when not sure whether it exists:
Compare that to what you’d usually have to write:
1 2 3 4 5 6
You might be wondering what does all of this have to do with ABS: well, we were supposed to have fully working short-circuiting but, as it turns out, there was a bug preventing this from working. Your code would work and run successfully, but it would always evaluate all the arguments of an expression, even if it short-circuited. In some cases (like when using short-circuiting for accessing properties) your code would crash — defeating the whole purpose of short-circuiting.
Install ABS with a simple one-liner:
…and start scripting like it’s 2019!