Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

ZPE 1.12.9 added explicit variable declaration

ZPE 1.12.9 features a few major changes and improvements, but one stands out more than the others: the introduction of explicit variable declaration.

Explicit variable declaration means that variables must be declared before they are used, either in an assignment or for anything else. For example, if a variable $x isn't defined first, the compiler will detect this and throw an error. 

$x = 15

will throw an error, whereas

number $x = 0
$x = 15

will not.

In addition, ZPE gets closer to having all underlying data types as ZPETypes. This will enforce the fact that things like plugins can only return types that ZPE itself controls, which will lead to better type safety. As of ZPE 1.12.9, we now have the ZPENumber data type underneath. It took me a whopping 8 hours to bring it to ZPE, and the implementation isn't complete yet. Further, I aim to improve the way the ZPEString is managed so that fewer checks need to be done with them as well.

Comments
Powered by DASH 2.0