This repository was archived by the owner on Feb 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Types
itevie edited this page Aug 23, 2023
·
1 revision
Types in the language have not been perfected yet, such as numbers (ints and floats) and arrays, though they are mostly functional.
To use types in variables, you can prefix the variable name with the type, like C#:
let string a = "Hello World"; // a is of type string, and will be enforced
let b = "Hello World"; // b is of type string, though reassigning type check will not be re-enforced
let string? c = "Hello World" // c i sof type string, type checking is enforced but c is nullable
c = null; // Valid
let string[] c = []; // Not valid at the moment, type must be "any" for arrays
Here are the list of types:
string
int
bool
float
-
array
- Array of different values -
object
- key-value dictionary where key is string and key is anything -
enummerable
- This is an internal type, though can still be created, e.g. range expresisons