Mélodium scripts can be launched using
Or if the main script includes a shebang:
Recommended shebang being
There are 3 roots when reffering to external elements in Mélodium:
main, relative to the main script file;
core, relative to the build-in language elements;
std, relative to the standard library.
local root can also be used and refers to the current location of the script.
Areas in Mélodium are matching the filesystem hierarchy.
// Import element John from local/foo/bar, coming from file ./foo/bar.mel use local/foo/bar::John // Import element Doe from main/baz, coming from file <main dir>/baz.mel use main/baz::Doe
Mélodium script files are plain UTF-8 text, without byte order mark. This choice is made for three main reasons:
- a choice on encoding, even arbitrary, is better than no choice;
- Unicode provides the wider support for any characters from all human languages and scripts, existing and future, ensuring continuity;
- the Mélodium engine is implemented in Rust, itself natively representing text as UTF-8.