o42a-0.2.3 Release Notes
Object values are now stateless by default. A stateless value is not cached in the object like before. Instead, it is evaluated on each request, like the object is a function without arguments.
Some value types are stateful however. Namely variables and mutable arrays (not rows). These values evaluated at most once and then stored inside objects. The subsequent value requests will return the same value. In case of variable, the value can be reassigned, but will never be re-evaluated.
No More Getters
Getters are gone. They are not needed any more. Links became stateless ant act exactly like getters before. A custom assignment can be applied to any link now.
The ‘Keep Value’ Operator
It is possible to evaluate the value once and to use it multiple times after that with a keep value operator:
Left := //a Right := //b Print [left] ' + ' [right] ' = ' [left + right] nl
Note that each of the operands is evaluated only once, which can be really useful if their value evaluation algorithms are heavy-weight, has side effects, or non-deterministic.
The ‘Value Of’ Operator
A new value of operator extracts the value of an object. It is a convenience expression, which makes it possible to write
/(a + b)
Integer (= a + b)
Runtime License Change
The language run-time libraries are licensed under the terms of LGPLv3 or later now. This allows to develop the proprietary programs in o42a.