Skip to content

Odin v0.2.0 - Windows

Compare
Choose a tag to compare
@gingerBill gingerBill released this 30 Apr 16:00
· 12730 commits to master since this release

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
    • Type assertion: x.(type)
      • Replaces union_cast and works with any not just unions
    • Bitcast: transmute(T, x)
      • Replaces transmute(T)x
  • os.args Command line arguments in os.odin

  • Correct C ABI for x86/amd64 on Windows

Changes

  • Remove .count and .capacity and replace with len() and cap()
  • Remove new_slice and replace with `make
  • Removed down_cast
  • Move Raw_* types to raw.odin
  • Change memory layout of any
  • Changes to fmt.odin
    • Remove sprint*
    • Add aprint*, bprint*, sbprint*
  • strconv.parse_int in strconv.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