The Nit Language

An academic, general purpose expressive language with a script-like syntax, a friendly type-system and aims at elegance, simplicity and intuitiveness.


Discover Nit



print "Hello world!"

var response = gets
print "You responded {response}"

for i in [0..4[ do
	print "{i}..."
end

Script-like syntax

Language without verbosity nor cryptic statements applying the KISS principle.

#?
var x = whatever
if x isa Int then
	print x + 6
end
					

Useful static types

Painless static types: static typing should help programmers.

class Person
	var name: Text
	var age: Int
end

var bob = new Person("Bob", 31)
var alice = new Person("Alice", 42)

Free constructors

With customization options per attribute

redef class String
    fun escape_sql... ?
end

Safe open classes

Class refinement is checked at compilation to detect ambiguity.

fun printf in "C" `{
	printf("We're in C!\n");
`}

fun printf in "Java" `{
	System.out.println("And Java!");
`}

Invoke foreign code

The foreign function interface supports C, C++, Java and Objective-C.

# Fibonacci sequence
#
# ~~~
# assert fib(1) == 
# assert fib(10) == 
# ~~~
fun fib(n: Int): Int do ...

Examples as unit tests

Lorem Ipsum is simply dummy text of the printing and typesetting industry.


Engine agnostic language

with two main implementations as a compiler and an interpreter.

Built-in support for Android and iOS

User interface using native controls. Easily extensible using class refinement and foreign code.

Safe multiple inheritance

with predictable linearization.

Academic language

Learn Nit
(première page du tuto?)





See Nit in action
List some complete programs





Use

Downloads

Libraries and programs

Get involved

Sponsors

Contribute

FAQ

etc

Some stuff for new comers, list a few issues?

Created by BLACKTIE.CO