Nex

Nex is a practical, expression-oriented language with clean control flow, contracts, classes, and REPL-friendly ergonomics. It is also designed to teach good software engineering practice: problem decomposition, interface design, invariants, and testable program structure.

Install Nex Start with the Tutorial
View Nex on GitHub

Simple Core

Clear syntax for values, functions, and control structures with minimal ceremony.

Engineering Discipline

Nex emphasizes contracts, decomposition, and clear interfaces so learners build correct software habits early.

Object + Functional

Classes and methods alongside first-class functions and composable expression forms.

-- From the Nex tutorial
function greet(name: String)
do
  print("Hello, " + name)
end

greet("world")

New to Nex? Start with the tutorial, then install the CLI and work through examples locally. Keep the Syntax Postcards and the complete class reference handy.

Install

Quick install

Download the bootstrap installer and run it. This installs the nex command so you can use it from anywhere.

bash <(curl -fsSL https://raw.githubusercontent.com/vijaymathew/nex/main/bootstrap-install.sh) jvm --install-deps

This is the recommended setup for full language support, including the REPL, formatting, documentation, and compilation tools.

Install without sudo

If you prefer a user-local install, place Nex under ~/.local and add that bin directory to your shell path.

bash <(curl -fsSL https://raw.githubusercontent.com/vijaymathew/nex/main/bootstrap-install.sh) jvm --prefix "$HOME/.local" && export PATH="$HOME/.local/bin:$PATH"

After installation, verify it with nex help or start the REPL with nex.

Books

Programming with Nex

A detailed introduction to the language, best read in the browser, that walks from the fundamentals to larger programs with clear examples and steady progression.

Prefer a printable copy? Download the print-ready PDF.

Beyond Code

A software engineering book that uses Nex to teach decomposition, interface design, invariants, and the discipline required to build systems that stay understandable as they grow.

The Design and Implementation of Nex

A short implementation manual that explains the design rationale behind Nex and walks through the parser, AST, interpreter, typechecker, code generators, library model, host integration, and concurrency runtime.

It is aimed at contributors and advanced readers who want to understand how the language is built, not only how to use it.

Back to main site