Neutron

A simple, modern, and lightweight interpreted programming language

Why Choose Neutron?

Neutron combines simplicity with power, offering a clean syntax and modern features for efficient development.

Dynamically Typed

No need to declare variable types. Write code faster with automatic type inference.

C-like Syntax

Familiar syntax for developers coming from C, C++, Java, or JavaScript.

Rich Standard Library

Growing standard library with modules for math, HTTP, JSON, and data conversion.

Object-Oriented

Full support for classes, methods, and the `this` keyword for structured programming.

Built-in Functions

Comprehensive set of built-in functions for common programming tasks.

Binary Compilation

Compile scripts to standalone executables for distribution without requiring the interpreter.

Modular

Organize your code with modules for better structure and reusability. Create native C++ extensions.

Clean, Expressive Syntax

Write clear, readable code with Neutron's intuitive syntax.

hello.nt
class Person {
    var name;
    var age;

    fun initialize(name, age) {
        this.name = name;
        this.age = age;
    }

    fun greet() {
        say("Hello, my name is " + this.name + " and I am " + this.age + " years old.");
    }
}

var person = Person();
person.initialize("Neutron", 1);
person.greet(); // Output: Hello, my name is Neutron and I am 1 years old.

Built for Performance

Neutron is implemented in C++ for optimal speed and minimal memory usage.

250K
Lines per Second
Token scanning performance
<1MB
Memory Usage
Minimal memory footprint
0.004s
Compile Time
For 1000-line programs

Get Started with Neutron

Install Neutron and start building your first program in minutes.

Terminal
# Clone the repository
git clone https://github.com/yasakei/neutron.git
cd neutron

# Build the interpreter
make

# Run your first Neutron program
./neutron examples/hello.nt