Home

Awesome

Melon is a small and modern programming language

CI Status

Actions Status Actions Status Actions Status

What's Melon?

Melon attempts to combine the best features of popular high-level languages in something that feels modern but is still small and light enough to be easy to embed in your project. It's inspired mainly by ES6 JavaScript, Lua, Wren, Python and Ruby.

It looks like this:

let Language = {
    create = |name|  => {
        return { name = name } @ Language;
    },
    
    getName = -> {
        return this.name;
    }
};

let Melon = {
    create = => {
        return { } @ Melon;
    },
    
    helloWorld = -> {
        io.print("Hello world " .. this->getName() .. "!");
    }
} @ Language.create("Melon");

let melon = Melon.create();
melon->helloWorld();

Features

Where to start

Melon is very young and there's still no documentation available. At the moment you can get a taste for the language by browsing the unit tests.

Platforms

Melon supports the following platforms:

Compiling

Melon uses CMake so you can use the standard way of building CMake projects:

mkdir build && cd build
cmake ..
make

MinGW

In order to link Melon and its binaries with MinGW-w64 you'll need the lld linker. You can install it on MSYS2 with: pacman -S mingw-w64-x86_64-lld or pacman -S mingw-w64-i686-lld depending on your architecture.

Disclaimer

Melon is still in alpha and it's certainly not ready for production! In the unlikely event that you are considering it for your project, please keep in mind that development is very active and nothing is written in stone at the moment.