Types and traits

LaiRu custom types provide data members, member methods, constructors, inheritance, and trait composition.

Target guide

Types describe object shape and behavior. Traits describe reusable requirements and provided methods. Access modifiers such as public, protected, and private control the visible surface.

Examples

Working pattern

1define person => type {2    data public name::string3    public label() => .name4}5local(p) = person(-name='Ada')6#p->label
Use this as a focused starting point and adapt it in context.

Related