Skip to content

Releases: odin-lang/Odin

Odin v0.0.5d

06 Jan 15:49
Compare
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
Compare
Choose a tag to compare

Fix build errors from invalid iterator types within for statements

Odin v0.0.5b

05 Jan 22:52
Compare
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
Compare
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
Compare
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

Odin v0.0.4

09 Dec 16:40
Compare
Choose a tag to compare

What's New

  • Go/BCPL style semicolon insertion rules - See: https://groups.google.com/forum/#!topic/golang-nuts/XuMrWI0Q8uk
  • odin build_dll Build project as .dll
  • #export for procedures
  • Always require an entry point procedure - main
  • Cyclic Type Checking
  • #include - renamed from #load
  • Changed import/include name syntax
    • #import thing "some_file.odin"
  • Built in string constants
    • ODIN_OS - target operating system ("windows")
    • ODIN_ARCH - target architecture ("amd64)
    • ODIN_VENDER - compiler vender ("odin")
    • ODIN_VERSION ("0.0.4")
    • ODIN_ROOT - root directory of the executable
  • when statement
    • Compile time if statement (only allowed within procedures)
  • when condition on #import, #include, #foreign_library #foreign_system_library
    • #import "win32.odin" when ODIN_OS == "windows"
  • Standard Library (WIP):
    • atomic.odin
    • sync.odin (Mutex, Semaphore)
  • Disabled u128 and i128 until big numbers are properly supported

Odin v0.0.3d

28 Nov 22:27
Compare
Choose a tag to compare

What's New

  • Rune literal syntax
    • Now: 'x', was: #rune "x"
  • Add global string constants (for later platform specific use)
    • ODIN_OS (e.g. "windows")
    • ODIN_ARCH (e.g. "amd64")
    • ODIN_VENDOR (e.g. "odin")
    • ODIN_VERSION (e.g. "v0.0.3d")
    • ODIN_ENDIAN (e.g. "little")
  • clamp builtin procedure (works on numerical and string types)

Bug fixes

  • Fix slice expressions for arrays and slices
  • fmt.odin correctly prints f32
  • Fix Vector's type information

Linux and OSX

Coming Soon™

Enjoy!

Odin v0.0.3c

23 Nov 15:01
Compare
Choose a tag to compare

What's New

  • Rewritten in C99 (from C++)
  • nil - Zero value for all types, except:
    • integers
    • floats
    • strings
    • booleans
  • Maybe types (nillable types)
    • m: ?int; ...; i, ok := m?;
  • match type for any
  • union_cast
    • x, ok := var union_cast Foo.Bar
  • Backend and stability improvements

Bug fixes

  • #import "..." as . will not act like #load and keep imported entities local to that file
  • Initialize global memory at compile time if possible
  • Fix enums with duplicate entries crash
  • Remove some duplicate error messages

Linux and OSX

Coming Soon™

Enjoy!