Releases: odin-lang/Odin
Releases · odin-lang/Odin
Odin v0.0.6
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
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
for
iterators - 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
for
andwhile
) - 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
WinMain
tomain
- I forgot to remove the experiment
Odin v0.0.5
What's New
give
statement - needed at end of block andif
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
andslice_ptr
enum_to_string
built in procedure- This may come back if enumerations change their behaviour
Odin v0.0.4
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)
- Compile time
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
andi128
until big numbers are properly supported
Odin v0.0.3d
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
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
forany
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!