Introduction of class [Outdated]

Introduction of class [Outdated]

This syntax is out of date please check this page

Classes are on the way you can find example class below

class Animal {

    co Animal(name) {
        if name == "cow" {
           this.name = "lion";
        }
    }

    pub v name: string;
    pri v len: int;    

    pub g lenOfString : string {
      ret this.name.len
    }

    pri s len : int (len) {
        if len == this.name.len {
            this.len = 0;
        } else {
            this.len = len;
        }
    }   
}
Created by @ahmtcn123

Created at 24.06.2021-12.00