PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Written By
Views

Halppp - Extend

Halppp - Extend

Extend is a new feature in my language that is added to reduce complexity of large classes.

Extend basically is like importing a library but inside the class so that functionality within a class can be separated.

This just show the functionality of it. You could basically share some functions between classes and separate them how ever you want. It also useful to cluster functions into a separate file.

class T
    int a = 0
    T int a => do this->a = a
    extend T/example
;

class P
    int a = 0
    P int a => do this->a = a
    extend T/example
;

//file T/example.ha
fn reset => do a = 0
fn add_one => do a++

Comments (0)

loading comments