Wi Programming Language


Wi is a small, fast, embeddable, prototype-based scripting language

obj_hunter := object {
    pounce: |self| => std::puts("${self.name} pounces on the yarn!");
};

obj_sleeper := object {
    nap: |self| => std::puts("${self.name} takes a nap in the sun.");
};

obj_cat := new obj_hunter, obj_sleeper {
    name: "Kitty";
    meow: |self| => std::puts("${self.name} says meow! (=^・ω・^=)");
};

whiskers := new obj_cat {
    name: "Whiskers";
};

whiskers->pounce(); // Whiskers pounces on the yarn!
whiskers->nap();    // Whiskers takes a nap in the sun.
whiskers->meow();   // Whiskers says meow! (=^・ω・^=)
Want to try it? Try it here!

Notes

This programming language was created by me, and only me – a single person. It's in beta, because I'm still designing it and breaking syntax changes are to be expected. The standard library is not something mind-blowing, but it's useful. Other than the API, the code is not heavily commented. Some parts may still need polish, and I'm very open to suggestions – if you have one, open an issue!
No AI was used in the development of Wi – only me, my horrendous laptop, my favorite book (Crafting Interpreters), and tons of Googling.
This website is still work-in-progress.