v0.2.0
v0.2.0
Type casting between different types are now more strict. This is to prevent unexpected and unintuitive behavior at runtime.
Only the following casts are allowed:
- Integer -> Real
- Real -> Integer (Truncates towards zero)
- Integer -> Text
- Real -> Text
- Bool -> Integer (true -> 1, false -> 0)
- Bool -> Real (true -> 1.0, false -> 0.0)
Migration
In previous versions, type casting was flexible. Any type could be casted to any other type. Upgrading to 0.2.0 introduces stricter rules that may break existing code. However, the changes are straightforward as the compiler will flag every affected line, making the fixes straightforward to apply.