Upgrading from older versions

If you are upgrading from an older version of Kaya you may need to make minor changes to your code. This page explains the necessary changes (versions that require no changes are not listed).

Upgrades to 0.2.5

  • The final parameter of replace when the first parameter is a compiled regular expression had been removed. Since this parameter was optional and did absolutely nothing, no deprecated version has been provided. However, if you never set this optional parameter, your programs will compile exactly as before.
  • A long-standing bug regarding assignment of array elements has now been fixed. Programs relying on the old buggy behaviour will need to be changed. In Kaya 0.2.4 and earlier, the code
    x = 5;
    a = [x,x+2];
    putStr(a[0]+" "+a[1]+" "+x);

    would give 6 7 6. It now correctly gives 5 7 6.

Upgrades to 0.2.4

  • A new syntax for Exceptions. The old syntax may be used by prepending the Exception definitions with a ‘%’, but you should switch to the new Exception syntax as soon as possible, as this gives more control over catching Exceptions, and the old syntax will be removed in the future 0.3.0 version.
  • Some changes have been made to file upload handling. It is no longer enabled by default, and the Uploaded type is now an abstract type. If you use file uploads, therefore, you must explicitly enable file uploads in your web applications, and use the access functions to retrieve data about the uploaded files. The file upload tutorial explains how to do this and covers other aspects of file uploading.

Upgrades to 0.2.1

  • The Webprog and Webapp modules and associated file headers have now been renamed to Webapp and CGI respectively. You will therefore need to change any webprog x; lines to webapp x; and any webapp x; lines to cgi x;, and equivalent changes to import Webprog; and import Webapp;.

Upgrades to 0.2.0

  • ‘Pass by reference’ is no longer the default for function arguments. Instead, a ‘shallow copy’ is the default. If you wish to allow a function to modify its arguments, you must use the var keyword. This is not necessary as often as you might expect – read the function parameters section of the functions tutorial for a more detailed explanation.

Recent Comments

No comments to show.