Changes
- C-style varargs
foreign
declaration blocks
foreign libc {
var errno: i32;
proc c_printf(fmt: ^u8, #c_vararg args: ..any) -> i32 #cc_c #link_name "printf";
}
expand_to_tuple
- Default procedure arguments
proc hello(a: int = 9, b = 9) {
fmt.printf("a is %d; b is %d\n", a, b);
}
proc foo(x: int) -> (first: string = "Hellope", second = "world!") {
return;
}
- Named procedure arguments
- Named return values
return a = 123, b = "blah";
#location()
and #caller_location
- Explicit parametric polymorphic procedures
proc new(T: type) -> ^T { ... };
- Command line arguments