Odin v0.2.0 - Windows
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_results
for procedures -
Interval syntax
a..b
open range [a, b]a..<b
half-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_cast
and works withany
not just unions
- Replaces
- Bitcast:
transmute(T, x)
- Replaces
transmute(T)x
- Replaces
- Basic type conversion:
-
os.args
Command line arguments inos.odin
-
Correct C ABI for x86/amd64 on Windows
Changes
- Remove .count and .capacity and replace with
len()
andcap()
- Remove
new_slice
and 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_int
instrconv.odin
Bug fixes
- Cast to
any
of untyped constants - Fix
append
crash 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
when
statements - Fix float precision printing