The following mostly applies to strict typing mode which can be enabled by putting
_pragma_ {strictTyping: true}
at the beginning of modules.
TYPES
nullnullany)anyany in your own code as the typing rules are tweaked for certain purposesfalse, trueboolnumberstringnumber and stringwordnull, bool, number, and string, and any tuple, array, record or map where the elements are also datadatadata is the type of serializable values. The compiler includes a comfy mechanism that casts data to any smaller type without having to add code for that (at the price of getting a compiler warning)[ element1, element2, element3 ][ string, number, bool -> string ]let [fst, snd] = pair (preferred)pair[#0 of 2] (index 0 of a 2-tuple)[ #name: "Tom", #age: 28 ]:person[ #name: string, #age: number ]person[#name] (index corresponding to the name label)[ element1, element2, element3 ]:arrayarray(string)a[i]a[i]? (results in a bool){ field1: element1, field2: element2 }{ field1: number, field2: bool -> string }rec.field1 or rec."field1" (but not the form rec.(expr)){ field1:10, field2:20 }:mapmap(number)m.(key)m.(key)? (results in a bool)UNDEFINED
The undefined value is element of all types.