Mana

Mana

Robbert Haarman

2010-12-11


Goals

Mana is designed to be a versatile language, intended to be used both as an interactive command language and as a programming language for developing large programs. The features of the language have been chosen with these goals in mind. Security considerations have also played a major role in the design of Mana.

Automatic Reclamation

Having to manually keep track of which resources are in use is a burden that makes simple programs cumbersome and complex programs error-prone. Realizing this, many programs make use of garbage collectors that automatically free the memory used by objects that are no longer reachable. Mana takes this concept one step further and allows not only memory, but any resource to be reclaimed automatically.

More about automatic reclamation

Simple Syntax

To make Mana usable as an interactive command language, it is important that the syntax contain as few unnecessary tokens as possible. At the same time, it is important that the syntax is expressive and can deal well with nesting. Ideally, the syntax should also be easy to parse programmatically. Mana's syntax borrows elements from Lisp and the Bourne shell to achieve these goals.

More about Mana's syntax

Flexible Type System

Mana's type system aims to enable compile time checking and optimizations with minimal effort from the programmer. Type inference is used to determine the type of every value in the program. Overloading allows different functions with the same name to be defined, providing different behavior depending on the types of the arguments. Interfaces allow functions to accept values of any type implementing the correct interface, with the correct functions for the actual type being called at run time.

More about Mana's type system

Security Considerations

At the time of Mana's design, security advisories had been dominated for years by bugs that would not have been possible if programs had been written using more secure languages and libraries. Mana makes it impossible for programmers to make the mistakes that lead to these bugs, thereby at the same time making it easier to write programs and making written programs more secure.

More on security features in Mana

Valid XHTML 1.1! Valid CSS! Viewable with Any Browser