Skip to main content

mType

A statically typed, class-based language with a bytecode VM, JIT, and rich tooling

Statically Typed OOP

Classes, interfaces, abstract / final / value classes, generics, and pattern matching — with a strict type checker and clear diagnostics.

Bytecode VM + JIT

AOT compile to .mtc bytecode and run on a stack-based VM. AsmJit-backed x86-64 JIT promotes hot paths automatically.

Async / Await

First-class Promise<T> with cooperative scheduling on the VM event loop. async functions, await expressions, and structured concurrency.

Reflection & Annotations

First-class Class, Method, Field, and Annotation reflection. Built-in annotations like @Script, @Throw, @Override plus user-defined annotations with @Retention / @Target.

Standalone Tooling

mtpm package manager, .mtproj / .mtworkspace project system, standalone language server, and a full-featured VS Code extension.

Native Executables

Build standalone executables that embed bytecode in a launcher binary — distribute apps without requiring users to install mType.

A Quick Taste

hello.mt
import * from "lib/collections/ArrayList.mt";

class Person {
private string name;
private int age;

public constructor(string name, int age) {
this.name = name;
this.age = age;
}

public function toString(): string {
return $"{this.name} (age {this.age})";
}
}

function main(): void {
ArrayList<Person> people = new ArrayList<Person>();
people.add(new Person("Alice", 30));
people.add(new Person("Bob", 25));
for (Person p : people) {
print(p.toString());
}
}

main();

Read the full Quick Start →