New Features
packagesystem- Improved PDB support with code inspection
typeidtype (also a keyword)typeis not a keyword any moreopaquetype- Parameteric polymorphic union type:
union(T: typeid, N: int) {int, T, [N]T}
bit_settype:bit_set[Some_Enum];bit_set['A' .. 'Z'];bit_set[0..8; u16];
cstringtype (useful for interfacing with C libraries)inbinary operator formapandbit_settypes:x in y
- Parametric polymorphic signature changes with polymorphic names:
new :: proc($T: typeid) -> ^T {}make_int_array :: proc($N: int) -> [N]int {}foo :: proc($N: $I, $T: typeid) {}
auto_castunary operator- Explicit
inlineandno_inlineon procedure calls deprecatedattributes- Built-in procedures:
#defined#assertcompile time assertexpand_to_tuplefor (fixed length) arraystypeid_of
"intrinsics"package:- Atomics
- Diverging procedures
proc() -> !(no return) using Foo :: enum {A, B, C}; f := A;Foo :: enum {A, B, C}; len(Foo)- New
contextfeatures:temp_allocatorlogger(Still in development)- Assigning directly to context parameters creates a new
context - (
contextis scope based)
- New compiler flags:
-lld(use LLD as the linker on Windows)
- Improved minimum dependency building
foreign import x {"foo.lib", "bar.lib"}
Removed Features
using in- Old import system (replaced with the
packagesystem)