About Mars

Mars is a very simple imperative programming language with a catch: all of the functions and expressions are pure.

That means when you call a function, it is guaranteed to have no side-effects: it can't mutate its arguments, modify global variables, or perform input/output. But unlike other pure languages, Mars gives you all the nice features of imperative programming, like local variable assignments and loops. The compiler also automatically converts inefficient copy-and-update operations into in-place destructive operations.

Mars also has some other nice features borrowed from functional programming: a strong static type system, algebraic data types, pattern-matching switch statements, and higher-order functions.

Mars is an experiment, not a full-featured programming language. You can use it for playing with the boundaries between imperative and declarative programming, but we don't recommend you write real software with it.