Skip to content

Releases: odin-lang/Odin

Odin v0.1.0

11 Feb 21:22

Choose a tag to compare

Added:

  • Dynamic Arrays [...]Type
  • Dynamic Maps map[Key]Value
  • Dynamic array and map literals
  • Custom struct alignemnt struct #align 8 { bar: i8 }
  • Allow _ in numbers
  • Variadic append
  • fmt.sprint*
  • Entities prefixes with an underscore do not get exported on imports
  • Overloaded free for pointers, slices, strings, dynamic arrays, and dynamic maps
  • enum types have an implict names field, a []string of all the names in that enum

Removed:

  • Maybe/option types
  • immutable variables
  • Remove type keyword and other "reserved" keywords

Changed:

  • compile_assert and assertreturn the value of the condition for semantic reasons
  • thread_local -> #thread_local
  • #include -> #load
  • Files only get checked if they are actually used
  • match x in y {} // For type match statements
  • Version numbering now starts from 0.1.0 and uses the convention:
    • major.minor.patch

Fixes:

  • Many fmt.* fixes

To come very Soon™:

  • Linux and OS X builds (unofficial ones do exist already)

Odin v0.0.6b

29 Jan 14:47

Choose a tag to compare

Bug Fixes

  • Fix assignment of "untyped" constants to any (issue #13)
  • Fix crash when passing arguments with no value/type to a call

Odin v0.0.6a

28 Jan 20:19

Choose a tag to compare

What's New

  • Overloaded free
    • Accepts pointers, slices, and strings
  • 3 dotted ellipsis ...

Odin v0.0.6

27 Jan 23:12

Choose a tag to compare

What's New

  • Procedure Overloading
  • All loops are for loops:
    • for i := 0; i < 12; i+=1 {}
    • for cond {}
    • for {}
    • for val in 0..<12 {}
    • for val in 0..12 {}
    • for val, idx in 3..<12 {}
    • for _ in array {}
  • match type name in expr {}
  • cast(T) transmute(T) down_cast(T) union_cast(T)
  • Improved fmt.printf
  • Record fields separated by commas struct { x: int, y: f32, z: int }
  • Capacity removed slices. Slices are just ptr + count
  • Helper type
    • type int
    • type proc(int) -> f32
  • Prefixes: immutable using thread_local no_alias
  • Library names - explicit library need for foreign procedures
  • Basic directives: #file #line #procedure

Odin v0.0.5e

07 Jan 11:49

Choose a tag to compare

Bug fixes

  • Fix problems with core library (os.odin, mem.odin, sys/windows.odin)
  • Disable adding entity definitions for blank identifiers

Thanks

Thank you @Fyoucon for testing 0.0.5? and for the numerous patches I've had to do 😛.

Odin v0.0.5d

06 Jan 15:49

Choose a tag to compare

Bug Fixes

  • Fix pointer to arrays as for iterators
  • Remove need for extra stack allocations in runtime startup.

Odin v0.0.5c

05 Jan 23:54

Choose a tag to compare

Fix build errors from invalid iterator types within for statements

Odin v0.0.5b

05 Jan 22:52

Choose a tag to compare

Bug Fixes

  • Check if a procedure returns (fix for for and while)
  • Allow line comments on the last line of a file

Odin v0.0.5a

05 Jan 22:00

Choose a tag to compare

Bug fix

  • Fix SUBSYSTEM for link.exe from WINDOWS to CONSOLE
  • Change entry point from WinMain to main
    • I forgot to remove the experiment

Odin v0.0.5

03 Jan 20:32

Choose a tag to compare

What's New

  • give statement - needed at end of block and if expressions
  • block expressions
x := {
    y := 123;
    give y-1;
};
  • if expressions
x := if cond {
    y := 123;
    give y-1;
} else {
    y := 321;
    give y+1;
    };
  • while loop
while cond {

}
while x := 0; x < 123 {

    x += 1;
}
  • New style for loop
list := []int{1, 4, 7, 3, 7, 2, 1};
for value : list {
    fmt.println(value);
}
for val, idx : 12 ..< 17 {
    // Iterates from 12 to 16 (inclusive)
    // Optional index value: `idx`
    fmt.println(val, idx);
}
msg := "Hellope";
for r : msg {
    // r is a `rune` as this procedure iterates
    // the utf-8 string and returns the corresponding
    // codepoint or `rune` 
    fmt.println(r);
}
  • New style enumerations (Most likely to change)
Byte_Size :: enum f64 {
    _, // Ignore first value
    KB = 1<<(10*iota), // 1<<10
    MB,                // 1<<20
    GB,                // 1<<30
    TB,                // 1<<40
    PB,                // 1<<50
}
  • Updates to the core library to accommodate the new features

Removed Features

  • Automatic semicolon insertion in favour of "mandatory" semicolons.
    • Semicolons are optional in a few cases but mainly for sanity reasons
  • Nested constants from within certain records
  • Increment and decrement operators: ++ --
  • Capacity value in slices
    • Slices are now just a pointer and count
  • append built in procedure
  • capacity arguments in new_slice and slice_ptr
  • enum_to_string built in procedure
    • This may come back if enumerations change their behaviour