TODO
Features that i will add soon™
Multiple return values
I’m still not sure if i need tuples or if i can do it like Go. Adding tuples means i also need to add some form of destructuring aswell.
get_numbers fn() -> (i32, i32) {
return 1, 2
}
// Go style, we just return 2 independant values so we can't store them together as a tuple.
tuple : (i32, i32) = get_numbers() // Error, assignment mismatch: 1 variable but get_numbers returns 2 values
a, b : i32, i32 = get_numbers() // Valid
// Using tuples like Rust
tuple : (i32, i32) = get_numbers() // Valid
a, b : i32, i32 = get_numbers() // Tuple get destructured
I am not a fan of how declarations and assignments work with destructuring. In Go and Rust you need to use the declaration keyword if one of the variable
TODO