qupa-project / uniview-lang

View once immutability enabling the safeties of immutable code, while enjoying near procedural performance
https://uniview.qupa.org
MIT License
2 stars 0 forks source link

Switched to colon type notation #15

Closed AjaniBilby closed 3 years ago

AjaniBilby commented 3 years ago

Switched to using a more modern syntax for typing to make it more accessible to modern programmers (this form is used in Rust, TS, Pony, etc).

E.g.

struct Person {
    id: int;
    age: float;
}

fn nothing(a: int, b: bool) {
    // returns void
    return;
}

fn main(): int {
    let a = Blank#[Person]();
    let b: Person = Blank#[Person]();

    return 0;
}