Skip to content
/ typo Public

extreme type definitions

swisd/typo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typo

extreme pain language that requires you to define anything and everything

program helloworld;

typ INT i32;
typ STR str;
typ FLOAT f64;

var pi: FLOAT &mut = 3.14159;

// you can also use the builtin types
var myVariable: str = "hello";

args add {
    define a as INT;
    define b as INT;
}
args sub {
    define a as INT;
    define b as INT;
}
args mul {
    define a as INT;
    define b as INT;
}
args div {
    define a as INT;
    define b as INT;
}

repr Math {
    return: INT;
}

cls Math {
    fn add(a, b) -> INT {
        return a + b;
    }
    fn sub(a, b) -> INT {
        return a + b;
    }
    fn mul(a, b) -> INT {
        return a + b;
    }
    fn div(a, b) -> INT {
        return a + b;
    }
}


fn main() -> None {
    prn("Hello World");
    prn(Math::add(5, 10));
}

About

extreme type definitions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages