Mars 0.3.1

Mars Programming Language
Mars is a very simple imperative/declarative 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, like mutating its arguments, much like Haskell or Erlang. But, unlike those other pure languages, Mars gives you all the nice features of imperative programming, like conditional statements and while loops.

(A minor caveat to the side-effects point: Mars does allow impure input and output, for simplicity, and also provides optional array mutation primitives, should you really need them).

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.

last updated on:
October 27th, 2011, 7:43 GMT
price:
FREE!
developed by:
Matt Giuca
license type:
GPL v3 
category:
ROOT \ Programming

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

What's New in version 0.3
  • Pattern bindings in case statements are now like any other assignment -- scoped to the entire function and in the same namespace as all the other locals. Patterns no longer create a new scope, and the variables they create no longer shadow existing locals. It is now a type error if a local variable has the same name but different type as a pattern variable (backwards incompatible).
  • (LP: #513638) * It is now a compiler error if a switch statement does not cover all possible constructors of the type it switches over, preventing the possibility of runtime pattern match failure errors (backwards incompatible).
  • (LP: #408411) * Variables no longer require declaration. Any variable assigned in a function is now implicitly a local variable. It is no longer an error to assign to a global variable or an undefined variable (this just creates a new local variable).
  • (LP: #483082) * The field reference and replace expressions and the field update statement now work (previously they displayed "not implemented" errors). It is now possible to access and update individual fields of an object by name, without having to use a switch.
read full changelog

Add your review!

SUBMIT