Changes / improvements
- Removed
Foo { 1, 2 }initializer. - Changed
Foo(<int>)toFoo {int}. - Removed
{| |}expression blocks. - Removed macro
&refand$varefparameters. - Removed
$vaexpr(0)syntax in favour of$vaexpr[0] - Enum does not cast to/from an integer (its ordinal).
- Removed use of
void!for main, test and benchmark functions. - Removed
$or,$and,$concatcompile time functions. - Removed
@adhocattribute. - Disallow inline use of nested generics (e.g.
List{List{int}}. - Remove
.allocator = allocatorsyntax for functions. - Remove
@operator(construct). - Removal of "any-switch".
- Allow swizzling assign, eg.
abc.xz += { 5, 10 }; - Added
$$wstr16and$$wstr32builtins. $foreach"()" replaced by trailing ":"$foreach ($x, $y : $foo)->$foreach $x, $y : $foo:$for"()" replaced by trailing ":"$for (var $x = 0; $x < FOO; $x++)->$for var $x = 0; $x < FOO; $x++:$switch"()" replaced by trailing ":"$switch ($Type)->$switch $Type:- Empty
$switchrequires trailing ":"$switch->$switch: - Rename
@return!to@return?and change syntax to require ":" after faults. - Remove
if (catch foo) { case ... }syntax. - Remove
[?]syntax. - Change
int!toint?syntax. - New
faultdeclaration usingfaultdef. - Enum associated values can reference the calling enum.
- Improve error message on
foo ?? io::EOFwith missing '?' #2036 - Make
@publicimport recursive. #2018 - Fault nameof prefixes the first last module path, for instance
std::io::EOFis rendered asio::EOF. - Rename
deftoalias. - Change
distinct->typedef. - Order of attribute declaration is changed for
alias. - Added
LANGUAGE_DEV_VERSIONenv constant. - Rename
anyfault->fault. !!foonow works same as as! ! foo.- Temp allocator now supports more than 2 in-flight stacks.
- Printing stacktrace uses its own temp allocator.
- Allow inferred type on body parameters. E.g.
@stack_mem(1024; alloc) { ... }; - Use
@pool_init()to set up a temp pool on a thread. Only the main thread has implicit temp pool setup. tmemis now a variable.- Compile test and benchmark functions when invoking
--lsp#2058. - Added
@formatattribute for compile time printf validation #2057. - Formatter no longer implicitly converts enums to ordinals.
Fixes
- Fix address sanitizer to work on MachO targets (e.g. MacOS).
- Post and pre-decrement operators switched places for vector elements #2010.
- Aliases were incorrectly considered compile time constants.
- FreeBSD libc stat definitions were incorrect.
- Atomic max was incorrect.
"+".to_float()would panic.importcan now both be @public and @norecurse.- Crash when trying to convert a struct slice to a vector #2039.
- Crash resolving a method on
Foo[2]whenFoois distinct #2042. - Bug due to missing cast when doing
$i[$x] = $z. - Incorrectly allowed getting pointer to a macro #2049.
- &self not runtime null-checked in macro #1827.
- Bug when printing a boolean value as an integer using printf.
- Show error when a generic module contains a self-generic type.
- "Single module" was not enforced when creating a static library using as a project target.
Stdlib changes
new_*functions in general moved to version withoutnew_prefix.string::new_from_*changed tostring::from_*.String.to_utf16_copyand related changed toString.to_utf16.String.to_utf16_tcopyand related changed toString.to_temp_utf16mem::temp_newchanged tomem::tnew.mem::temp_allocand related changed tomem::talloc.mem::temp_new_arraychanged tomem::temp_array.- Add
ONHEAPvariants for List/HashMap for initializing global maps on the heap. - Remove Vec2 and other aliases from std::math. Replace
.length_sq()withsq_magnitude() - Change all hash functions to have a common
hashfunction. @wstring,@wstring32,@char32and@char16compile time macros added.- Updates to
Atomicto handle distinct types and booleans. - Added
math::iota. @poolno longer takes an argument.Allocatorinterface removesmarkandreset.- DynamicArenaAllocator has changed init function.
- Added
BackedArenaAllocatorwhich is allocated to a fixed size, then allocates on the backing allocator and supports mark/reset. AnyListnow also defaults to the temp allocator.os::getcwdandos::get_home_dirrequires an explicit allocator.file::load_newandfile::load_path_newremoved.os::exitandos::fastexitadded.