Mercury ProjectShop

MetalPublic betaMercury's programming language

Metal reads like plain words: one statement per line, every block ends with end, and errors are written in plain English. It covers what people use HTML, JavaScript, Node.js, C, C#, and Java for.

Features

Plain wordslet, if ... then ... end, for each x in list do ... end.
Types when you want themlet age as number = 36
Classesclass Dog, has name, function speak()
Errors in Englishtry ... catch problem ... end, fail "something went wrong"
Modulesuse "helpers.metal"
Web pagespage "Hello" opens a page as an app window.

Start guide

  1. Install the metal package (it comes with Mercury).
  2. Make hello.metal with: print "Hello"
  3. metal hello.metal runs it. metal check hello.metal finds mistakes without running.
  4. metal build hello.metal makes something you can share.

Advanced details

A longer example
let name = "Ada"
let pet = {"name": "Rex"}
function add(a, b) return a + b end
class Dog
    has name, sound = "woof"
    function speak() print my name + " says " + my sound end
end
let rex = new Dog("Rex")
rex.speak()

Download