Jamie Balfour

Welcome to my personal website.

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

Jamie Balfour'sPersonal blog

Exceptional Elephant brings a big new feature that really makes the new version more powerful than ever. 

ZPE had for a long time relied heavily on using by value passing of variables to functions, both internal and externally, and this became even more confusing when the new reference types came to ZPE (aka ZPETypes). For example, the list_add_element function would actually modify the original list passed into it, whereas other functions would simply copy the list and change it. No longer do any of these predefined functions copy the value passed but will always modify the version passed to it.

So, passing by reference is very important. But then so is passing by value. Now you can specify this by running list_add_element(&$l) to pass by reference, passing the original list through or by value by simply writing list_add_element($l). It's also important to note that with any programming language and runtime, and not just YASS, that passing by reference is considerably faster.

I've been wanting to this feature into ZPE for a good few years but it was tricky. Since ZPETypes have been included it's been much clearer to me that it was easy enough to do.

Powered by DASH 2.0