A new programming language

Gravity is a small and high performance new programming language with a modern syntax. Think Swift, Javascript and Smalltalk combined into a tiny virtual machine that can efficiently run on any operating system.

Nowadays there a lot of new programming languages but no one was able to completely satisfy our needs. We wanted a modern syntax, we wanted a class based language that gives you the ability to efficiently use object oriented programming, we wanted a language that can acts as a prototype language with functional programming paradigms.
We wanted all into a tiny and high efficiently package!

Gravity

Gravity has no dependencies and the VM implementation is under 4000 lines of high performance C99 code. Once compiled it just adds a 30KB of overhead to your app but it enables you to abstract the underlying native operating system layer over a truly multi-platform and OS independant programming language.

We Open Source and we have released Gravity as source code into our GitHub account.

What Gravity looks like

Gravity is a modern high-level dynamically typed programming language with support for advanced features like:
  • nested classes
  • high efficiency closure support
  • built-in unit testing support
  • language extension with C API
  • API to add bridge for other languages and runtimes
  • ... and much much more.
@unittest {
	name: "Compute fibonacci(20) to stress test function call.";
	error: NONE;
	result: 6765;
};

func fibonacci(n) {
	if (n < 2) return n;
	return fibonacci(n-2) + fibonacci(n-1);
}

func main() {
	return fibonacci(20);
}