Mantton
◇ 001Toronto, Canada

HelloI'mMantton

§ 01

Projects

02 / FEATURED — UPDATED Q2 2026
// 02
Programming LanguageCompiler RustLLVMType Systems
2024 — Present · Experimental

Taro

Taro is an experimental, statically typed programming language inspired by Rust, Swift, and Go. It combines type inference, algebraic data types, pattern matching, interfaces, and automatic garbage collection with a compiler written in Rust, an LLVM 16 backend, a custom runtime, standard library, package tooling, CLI, LSP, and editor integrations.

Rust · LLVM · Inkwell
Bidirectional TypeChecking · Codegen
Garbage Collection · Runtime
◇ Language Tour
01 · Structs
struct ScoreCard {
  readonly player: string
  wins: int32
  losses: int32
}

impl ScoreCard {
  func new(player: string) -> Self {
    ScoreCard { player, wins: 0, losses: 0 }
  }

  // Computed property — chooses receiver effect
  var games: int32 {
    get(&self) { self.wins + self.losses }
  };

  func recordWin(&mut self) {
    self.wins += 1
  }
}
02 · Enums & Matching
enum Command {
  case quit
  case move(int32, int32)
  case resize(int32, int32)
  case write(string)
}

func describe(_ command: Command) -> string {
  match command {
    // Or-patterns share extracted bindings.
    case .move(x, y) | .resize(x, y) => "vector command"

    // Guards keep validation close to the pattern.
    case .write(text) if text.isEmpty() => "empty message"
    case .write(text) => text
    case .quit       => "shutdown"
  }
}
03 · Generics
import std.hash.Hashable

struct InlineCache[Key: Hashable, Value, const Capacity: usize = 8] {
  keys: [Key?; Capacity]
  values: [Value?; Capacity]
}

func slots[Key: Hashable, Value, const Capacity: usize](
  _ cache: &InlineCache[Key, Value, Capacity],
) -> usize {
  let _ = cache
  Capacity
}

func valueOrElse[T](_ value: T?, _ fallback: T) -> T {
  match value {
    case .some(v) => v
    case .none    => fallback
  }
}
04 · Interfaces
interface Identified {
  func id(&self) -> usize
}

interface Named {
  func name(&self) -> string

  // Default methods inherit on conformance.
  func display(&self) -> string {
    "@" + self.name()
  }
}

struct UserBadge {
  id: usize
  name: string
}

impl Identified for UserBadge {
  func id(&self) -> usize { self.id }
}

impl Named for UserBadge {
  func name(&self) -> string { self.name }
}

func openProfile(_ value: any Identified & Named) -> string {
  value.display()
}