The Macaulay2 language is a simple yet powerful interpreted language. Every object has a type, such as Type, ZZ (integer), String, HashTable, Ring, Matrix, Function, etc. User defined variables may hold values of any type.
The Macaulay2 language is based on expressions, which, generally speaking, are used to create new objects from old ones. Other computer languages have things called statements, but Macaulay2 does not. Other computer languages use newline characters and even indentation to indicate separate and nesting of statements, but Macaulay2 does not. Expressions in Macaulay2 include function calls, control structures (e.g., for and while loops), function definitions, and operator expressions. Every expression returns an object, although the basic object null is often returned if the expression is being used only to produce some side effect.
There is special syntax for creating and accessing strings, lists, sequences, and hashtables. These are the key data types underlying many new types. The Macaulay2 engine implements rings, ring elements, and matrices, as instances of low-level types, and various high-level types, visible to the user, are based on them. Examples include Ring, RingElement, Matrix, Ideal, RingMap, Module, and ChainComplex.
The user can create new types of higher level mathematical objects, whose types form a hierarchy that facilitates the installation and use of appropriate methods for computing with them.