Releases: odin-lang/Odin
Releases · odin-lang/Odin
Odin v0.1.0
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
freefor pointers, slices, strings, dynamic arrays, and dynamic maps - enum types have an implict
namesfield, a []string of all the names in that enum
Removed:
- Maybe/option types
- immutable variables
- Remove
typekeyword and other "reserved" keywords
Changed:
compile_assertandassertreturn the value of the condition for semantic reasonsthread_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
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
What's New
- Overloaded
free- Accepts pointers, slices, and strings
- 3 dotted ellipsis
...
Odin v0.0.6
What's New
- Procedure Overloading
- All loops are
forloops: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 inttype proc(int) -> f32
- Prefixes:
immutableusingthread_localno_alias - Library names - explicit library need for foreign procedures
- Basic directives:
#file#line#procedure
Odin v0.0.5e
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
Bug Fixes
- Fix pointer to arrays as
foriterators - Remove need for extra stack allocations in runtime startup.
Odin v0.0.5c
Fix build errors from invalid iterator types within for statements
Odin v0.0.5b
Bug Fixes
- Check if a procedure returns (fix for
forandwhile) - Allow line comments on the last line of a file
Odin v0.0.5a
Bug fix
- Fix SUBSYSTEM for link.exe from WINDOWS to CONSOLE
- Change entry point from
WinMaintomain- I forgot to remove the experiment
Odin v0.0.5
What's New
givestatement - needed at end of block andifexpressions- block expressions
x := {
y := 123;
give y-1;
};
ifexpressions
x := if cond {
y := 123;
give y-1;
} else {
y := 321;
give y+1;
};
whileloop
while cond {
}
while x := 0; x < 123 {
x += 1;
}
- New style
forloop
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
appendbuilt in procedure- capacity arguments in
new_sliceandslice_ptr enum_to_stringbuilt in procedure- This may come back if enumerations change their behaviour