Welcome to the idea of language based around Kotlin and Rust!
Uses C-like comments. // comments entire lines, /* ... */ gives you ability to comment inside of something or comment multiple lines
// One liner
function(/* Insides */) // description of it!
/*
multiple liner!
*/
Uses rust-like types
i8,i16,i32,i64,i128andisizesigned intigeru8,u16,u32,u64,u128andusizeunsigned integerf8,f16,f32,f64,f128andfsizefloatcharcharacter (to create character use''example:'a')boolboolean (trueorfalse)
Tuple syntax is also rust-like. They are groups with multiple types of values inside with fixed size and can be destructed. Example way of creating:
tuple: (fsize, u16, bool) = (1.0, 24, true)
Accessing value is different than in rust, instead of tuple.i (i is index/place of value in tuple) it uses array like syntax accessing.
Example way of accessing value:
value: fsize = tuple[0] //returns 1.0 of type fsize
// remember `tuple` variable is (1.0, 24, true)
You can also destruct the tuples by using different variable syntax which simply destructs the tuple into multiple variables. Example of destruction:
(float: fsize, number: u16, answer: bool) = tuple
float //returns 1.0 with type fsize
number //returns 24 with type u16
answer //returns true with type bool
Array syntax is instead kotlin-like. They are groups of same type and with fixed size. Example way of creating:
array: char[5] = ['h','e','l','l','o']
number inside char[5] defines fixed size of array, and char defines type of values in array.
You can access value inside array exactly the same way like you did in tuple!
Example of accessing value:
letter: char = array[3] //returns `l` with type char