Skip to content

v0.11.0

Compare
Choose a tag to compare
@gingerBill gingerBill released this 01 Nov 19:50
· 8933 commits to master since this release

New Features:

  • Ranged fields for array compounds literals
foo := [?]int {
	0 = 123,
	5..9 = 54,
	10..<16 = i*3 + (i-1)*2,
};
  • inline for loops (only for in based for loops)
inline for x, i in 1..<4 {
	fmt.println(x, i);
}
  • where clauses 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)
    • quaternion128 and quaternion256
  • 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 (replaces package types)
  • union #no_nil
  • mem.slice_data_cast
  • #panic
  • Add @force for foreign import
  • Add minor suggestions to errors on casts and assignments
  • Change ODIN_OS string for macos/osx "osx" to "darwin" to allow for other platforms
  • Add dummy packages purely for documentation of builtin and intrinsics

Updates:

  • Type inference improvements for call expressions and procedure group parameters
  • Update package odin_parser et al.
  • require_results is now an attribute rather than a suffix tag for procedures
  • Improved multi-threaded parser
  • Change the behaviour of foreign import on darwin to be more consistent with other platforms
  • fmt.print*_err has been replaced with fmt.eprint*
  • Consistent typeid semantics 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 #complete switch 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