New Features:
- Ranged fields for array compounds literals
foo := [?]int {
0 = 123,
5..9 = 54,
10..<16 = i*3 + (i-1)*2,
};inline forloops (only forinbased for loops)
inline for x, i in 1..<4 {
fmt.println(x, i);
}whereclauses for procedures, structs, and unions
foo :: proc(x: [$N]int) -> bool
where N > 2 {
fmt.println(#procedure, "was called with the parameter", x);
return true;
}- Proper System V AMD64 Support on Darwin and Linux
- Built-in Quaternions (Not just an April Fool's Joke any more)
quaternion128andquaternion256
- Struct field tags
Foo :: struct {
x: int `tag1`,
y: string `json:"y_field"`,
z: bool, // no tag
};- New and improved
package math - New
package math/linalg intrinsics.type_*package reflect(replacespackage types)union #no_nilmem.slice_data_cast#panic- Add
@forceforforeign import - Add minor suggestions to errors on casts and assignments
- Change
ODIN_OSstring for macos/osx "osx" to "darwin" to allow for other platforms - Add dummy packages purely for documentation of
builtinandintrinsics
Updates:
- Type inference improvements for call expressions and procedure group parameters
- Update
package odin_parseret al. require_resultsis now an attribute rather than a suffix tag for procedures- Improved multi-threaded parser
- Change the behaviour of
foreign importon darwin to be more consistent with other platforms fmt.print*_errhas been replaced withfmt.eprint*- Consistent
typeidsemantics across all assignments - Improvements to
package unicode/utf8
Bug fixes:
- Fix ranges in switch statements for strings
- Fix comparison for bit field values
- Fix double-pointer indexing bug
- Fix procedure group compiler assert with no matching arguments
- Fix procedure constant declarations value type assignment checking
- Fix disallow blank identifier polymorphic types
$_ - Fix unions with zero variants
- Fix bounds checking on slices for constant parameters
- Fix array comparisons
- Fix
~(1 << x)inference bug - Fix Using any in if statement
- Fix
#completeswitch with pointer case - Fix procedure group "best fit" algorithm for polymorphic procedures
- Fix double calling of LHS of logical binary expressions
- Fix stack overflow bug caused by polymorphic record with polymorphic parameters
- Fix polymorphic record parameter determination bug caused by polymorphic constants not be handled correctly