
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
- Install the metal package (it comes with Mercury).
- Make hello.metal with: print "Hello"
- metal hello.metal runs it. metal check hello.metal finds mistakes without running.
- 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()
Mercury ProjectShop