Skip to content

Tiny v0.1.0 - First Public Preview

Choose a tag to compare

@confh confh released this 25 May 16:06
· 59 commits to master since this release

Tiny v0.1.0 - First Public Preview

This is the first public preview release of Tiny.

Tiny is a lightweight scripting/programming language built with Go. It includes a custom VM, bytecode cache, classes, functions, std modules, and scripting-friendly syntax.

Highlights

  • Fast Go-based VM
  • Bytecode compilation and cache support
  • Lightweight scripting syntax
  • Functions and anonymous functions
  • Default, variadic, nullable, and typed parameters
  • Closures with captured variables
  • Classes with fields and methods
  • Enums
  • Arrays and objects
  • String interpolation
  • Optional chaining
  • Union type hints
  • Class type hints
  • try/catch error handling
  • Stack traces
  • spawn and task support
  • Import/export system
  • Standard library modules
  • Plugin support
  • VS Code / LSP support through the Tiny Language Support extension

Language Features

Tiny currently supports:

  • let and const
  • fn
  • anonymous functions
  • return
  • if, else, else if
  • while
  • for
  • for in
  • break and continue
  • try, catch, and throw
  • class
  • field
  • public / private
  • enum
  • import
  • export
  • spawn
  • task.await
  • optional chaining with ?.
  • type hints
  • union types like string | null
  • nullable params like name?: string

Standard Library

Tiny includes std modules for common scripting tasks, including:

  • io
  • time
  • json
  • array
  • string
  • object
  • math
  • fs
  • path
  • process
  • http
  • net
  • buffer
  • regex
  • error
  • runtime

Some modules may still change as Tiny evolves.

Example

import std "io";

class Counter {
    field value: number = 0;

    fn inc() {
        this.value++;
        return this.value;
    }
}

const counter = Counter();

io.println(counter.inc());
io.println(counter.inc());