Repository navigation
0.1.2
0.1.2
Compiler
i128/u128fully supported now.
Because untyped literals are i128, for full u128 bit constant, it should be explicitly typed.
-
Hard error when specifiying default values for comptime (generic) arguments in functions
-
Function pointers now could survive comptime -> runtime, so it can be used as generic params
struct Container($F: *fn(): i32) {
x: i32;
};
fn foo(c: *Container($F)): i32 {
return $F();
}
fn goo(): i32 {
return 10;
}
fn boo() {
x: Container(goo.^) = 0;
foo(x.^);
}- Conditional compilation with #if (condition) { ... } else { ... }
Good replacement for "#run { #emit }" pattern
It is more performant (because avoids code generation and parsing) and is not deferred as #run
#if (mox_platform == .x86_64_win) {
import "./win.mox";
} else {
import "./not_win.mox";
}- Indexing generic bound array fixed
struct Generic($ARR: [$N]u64) {}
fn index(a: *Generic($ARR), i: i64): u64 {
return $ARR[0]; // now works
}- Inferring poly arguments of function pointer now works
Modules
-
Rapidhash implementation
-
Comptime error when not enough values passed to format
-
Slice split_iterator which iterates over non-splitter sub slices
for (it : split_iterator(",a,b,c", ",")) {
// it here is: "", "a", "b", "c"
}-
parse_int, parse_uint, parse_float utils
-
Std module that re-exports all core modules, so now only "std.mox" can be imported
-
Hash maps implementation
-
A lot of small utils in std lib