Introducing Zenoscript
Wess Cope

Wess Cope @wess

About: I suffer from Application Development Disorder.

Location:
Columbia, SC
Joined:
Sep 28, 2018

Introducing Zenoscript

Publish Date: Jun 27
3 1

Have you ever wished TypeScript felt more functional? Meet Zenoscript — a new language built with the power of functional programming and the practicality of the TypeScript ecosystem. It compiles directly to TypeScript, meaning there's zero runtime overhead and complete interoperability with existing TS codebases.


🚀 What Is Zenoscript?

Zenoscript is a functional-first programming language that compiles to clean, idiomatic TypeScript. It’s built for developers who want features like pattern matching, structural typing, and immutable data structures—without giving up access to TypeScript libraries or tools.

Highlights:

  • ✅ Functional by default — immutable, pure functions, expressive patterns
  • ⚡️ Zero runtime dependencies — compiles to plain TS
  • 🔁 Seamless TypeScript interop
  • 🔧 Modern DX — CLI, REPL, VS Code extension
  • 🧪 Built for Bun — fast, lightweight, dev-friendly

🧠 Core Features

🎭 Pattern Matching with Atoms

let handleResponse = match response {
  :success(data) => processData(data)
  :error(msg) => logError(msg)
  :loading => showSpinner()
  _ => defaultHandler()
}
Enter fullscreen mode Exit fullscreen mode

🔗 Pipe Operator

Zenoscript makes chaining transformations readable and elegant:

let activeUsers = users
  |> filter(user => user.status === :active)
  |> map(user => user.name)
  |> sort
Enter fullscreen mode Exit fullscreen mode

🧱 Structural Typing with Traits

struct User {
  id: number;
  name: string;
  email: string;
  status: UserStatus;
}

trait Serializable {
  serialize(): string;
  deserialize(data: string): Self;
}
Enter fullscreen mode Exit fullscreen mode

🛡 Immutable by Default

let numbers = [1, 2, 3]
let doubled = numbers |> map(x => x * 2)
// numbers stays unchanged, doubled = [2, 4, 6]
Enter fullscreen mode Exit fullscreen mode

✨ Why Use Zenoscript?

  • No runtime bloat
    Your code compiles straight to efficient TypeScript.

  • Use TS libraries
    Import .zs files directly into Bun + TypeScript projects:

  import { User } from "./types.zs"
  import { processData } from "./handlers.zs"
Enter fullscreen mode Exit fullscreen mode
  • Great Dev Experience

    • Live REPL (zeno repl)
    • VS Code plugin
    • Helpful errors
    • Hot reloading

📦 Getting Started

🛠 Installation

# macOS / Linux
curl -fsSL https://zeno.run/install.sh | bash

# Windows (PowerShell)
iwr https://zeno.run/install.ps1 | iex

# Or via Bun
bun install -g zenoscript
Enter fullscreen mode Exit fullscreen mode

🧪 Your First Project

mkdir my-app && cd my-app
zeno init
bun dev
Enter fullscreen mode Exit fullscreen mode

You’ll get a ready-to-run dev setup with hot reloading.


🧾 Basic Example

// user.zs

struct User {
  name: string;
  email: string;
  status: Symbol;
}

let users = [
  { name: "Alice", email: "alice@example.com", status: :active },
  { name: "Bob", email: "bob@example.com", status: :inactive }
]

let getActiveUsers = () => users
  |> filter(user => user.status === :active)
  |> map(user => user.name)

let statusMessage = (status) => match status {
  :active => "User is currently active"
  :inactive => "User is inactive"
  _ => "Unknown status"
}

console.log("Active users:", getActiveUsers())
Enter fullscreen mode Exit fullscreen mode

🔮 What’s Next for Zenoscript?

  • ✨ Guard clauses in pattern matching
  • 🧠 Smarter type inference and compile-time checks
  • 📚 Expanded standard lib with functional utilities
  • 🛠 Debug tooling + improved IDE support
  • 🕸 WebAssembly compilation targets

💡 Contribute & Explore

Zenoscript is open-source and welcoming contributors:


Ready to Try It?

curl -fsSL https://zeno.run/install.sh | bash
zeno init my-app && cd my-app
bun dev
Enter fullscreen mode Exit fullscreen mode

Then explore the language and share what you build! ✨


Let me know what you think of Zenoscript in the comments below. Are you ready to go functional without leaving the TypeScript universe?


✍️ Originally published on zeno.run/blog
🏗 Project site: https://zeno.run

Comments 1 total

  • Zako Mako
    Zako MakoJun 29, 2025

    I like your design and how you are creative!😀
    P.S: I have my own language called faceonescript. Here’s a example:

    //include funtion()
    //seperate ((DEBUG)).5
    //<p> hello world! <p>
    //return.5 if [false]
    
    Enter fullscreen mode Exit fullscreen mode
Add comment