Skip to content

heliumlang/helium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Helium

Modern scripting language

Helium is a simple scripting language that ensures safety, correctness and ease of use.

mod main

struct Point {
    pub int x
    pub int y
}

fn [a Point] add(Point b) Point {
    return new Point(x: a.x + b.x, y: a.y + b.y)
}

struct Person {
    pub string name
    pub string surname
    pub string fullname

    init(string name, string surname) {
        @name = name
        @surname = surname
        @fullname = name + ' ' + surname
    }
}

fn main() {
    p1, p2 := new Point(x: 5, y: 2), new Point(x: 3, y: 1)
    p3 := p1.add(p2)

    person := new Person("John", "Doe")
    println(person.fullname)
}

About

Source of helium

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages