Added
-
Complex numbers
complex64,complex128
-
Quaternions
quaternion128,quaternion256
-
New built in procedures
conj(x)len(x),cap(x)make([]T),make([dynamic]T),make(map[K]V)transmute(T, x)
-
#require_resultsfor procedures -
Interval syntax
a..bopen range [a, b]a..<bhalf-closed range [a, b)
-
Interval expression is match statements
case 'A'..'Z', 'a'..'z':
-
Addressing operator
&(replaces^)x: int; p: ^int = &x; i: int = p^;
-
New casting syntax
- Basic type conversion:
type(x)- Replaces
cast(type)x
- Replaces
- Type assertion:
x.(type)- Replaces
union_castand works withanynot just unions
- Replaces
- Bitcast:
transmute(T, x)- Replaces
transmute(T)x
- Replaces
- Basic type conversion:
-
os.argsCommand line arguments inos.odin -
Correct C ABI for x86/amd64 on Windows
Changes
- Remove .count and .capacity and replace with
len()andcap() - Remove
new_sliceand replace with `make - Removed
down_cast - Move
Raw_*types toraw.odin - Change memory layout of
any - Changes to
fmt.odin- Remove
sprint* - Add
aprint*,bprint*,sbprint*
- Remove
strconv.parse_intinstrconv.odin
Bug fixes
- Cast to
anyof untyped constants - Fix
appendcrash when pointer is passed - Fix slicing bug on dynamic arrays
- Fix map key not getting transferred on rehash
- Bugs with union size and alignment
- Fix procedure literal scopes and dependencies
- Fix subtype polymorphism
- Fix double declaration in
whenstatements - Fix float precision printing