Syntax changes Some functions has had their syntax changed as they are now `default functions`. These functions are the following:
If-trees:
Loops:
Misc:
Custom functions have been added to allow for more flexibility and to allow for code reuse. This is supposed to be the updated and reworked version of the previously removed `Macros` which some of you might remember.
Return types
Custom functions require either a `return type` (such as `int`) or `def` if there is no return value. Any data type can be used as a return type. Lists are formatted as `type[]`.
Arguments
A function can be equipped with an, essentially, unlimited amount of arguments. The format for arguments is as follows `type:name=defaultValue`.
The type and default value is optional for arguments.
Not including a type will allow any value, though only the functions assigned to "Any" will be accessible through it.
Not including a default value will make an argument required, as opposed to optional. An argument with a default value can of course be overriden. Arguments can be accessed via both `position` and `keyword` (see `someFunction` below).
Constants store a constant value, equal to `static final` values in Java.
Constants are usable as default values in functions, provided they are declared __BEFORE__ the function. They may also have the value as returned by a function, provided it is declared __AFTER__ the function.
Imports are used to declare what objects to use for a script. This is useful when an external plugin is used, such as Artifact.
Durations can now be natively parsed by Helix and no bulky constructor, e.g. `Duration.parse("10s")` is required. Durations can instead be written as just `10s`.
Parsing has been improved and Helix (and Artifact) will give detailed information about line, software and cause when an error occurs.
Bug fixes and minor improvements Most systems have been upgraded to be more robust and easier to use. Some systems have gotten overhauls as they where outdated. A lot of minor bugs have also been fixed.