Modules

Introduction

A module is a package which contains one or more files. These files can contain declarations of variables (values, functions or class definitions), in any namespace.

Private variables are only accessible from inside their module of declaration.

It is not possible to import two modules with the same name.

It is possible to pre-compile a module.

Usage

A file of the module which will be imported:

MyClass = class {
    i = 3;
};

Another script:

import "/path/to/file";

print(MyClass.i); // 3