HEXOLANGGitHub ↗

Classes & OOP

Classes, inheritance, constructors, methods and access levels.

Hexolang supports class declarations, inheritance with extends, constructors, methods, static members, super, this, and public/private members.

hexo
class Person {
    string name;
    fn init(string name) {
        this.name = name;
    }
    fn introduce() {
        print("Hello, " + this.name);
    }
}
let person = Person("Hexo");
person.introduce();
Last updated 2026-11-21Suggest an edit ↗