A simple, modern, and lightweight interpreted programming language
Neutron combines simplicity with power, offering a clean syntax and modern features for efficient development.
No need to declare variable types. Write code faster with automatic type inference.
Familiar syntax for developers coming from C, C++, Java, or JavaScript.
Growing standard library with modules for math, HTTP, JSON, and data conversion.
Full support for classes, methods, and the `this` keyword for structured programming.
Comprehensive set of built-in functions for common programming tasks.
Compile scripts to standalone executables for distribution without requiring the interpreter.
Organize your code with modules for better structure and reusability. Create native C++ extensions.
Write clear, readable code with Neutron's intuitive syntax.
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.
Neutron is implemented in C++ for optimal speed and minimal memory usage.
Install Neutron and start building your first program in minutes.
# 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