Types
Runtime value kinds and operator compatibility in current Jot.
Jot currently enforces type rules at runtime.
Runtime value kinds
LongDoubleJotBigIntegerJotBigDecimalBooleanJotListJotFunctionJotNull
Number literals
let i = 123
let d = 12.34- Integer literals parse as decimal digits.
- Decimal literals require digits on both sides of
.. - Extremely large values use big-number runtime representations.
Operator compatibility
Arithmetic/comparison operators are defined for numeric operands.
print(1 + 2)
print(1 + 2.0)Second line currently raises a runtime type error because mixed Long + Double arithmetic is not implemented.
Equality
print(1 == 1)
print(true != false)
print([1, 2] == [1, 2])List/function/object equality is identity-based.