DEV Community

lechat
lechat

Posted on

My language now can make instances

I made a language and the language now can make instances:

class A {
    pub name = "john";
    pub weight = 10;
    pub fn f() {
        return "cat";
    }
}
let b = new A();
print(b.name);
print(b.f());
Enter fullscreen mode Exit fullscreen mode

Wow, I'm happy for this :)

Top comments (0)