Releases
v0.7.0
Changes / improvements
Removed Foo { 1, 2 }
initializer.
Changed Foo(<int>)
to Foo {int}
.
Removed {| |}
expression blocks.
Removed macro &ref
and $varef
parameters.
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
, $concat
compile time functions.
Removed @adhoc
attribute.
Disallow inline use of nested generics (e.g. List{List{int}}
.
Remove .allocator = allocator
syntax for functions.
Remove @operator(construct)
.
Removal of "any-switch".
Allow swizzling assign, eg. abc.xz += { 5, 10 };
Added $$wstr16
and $$wstr32
builtins.
$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 $switch
requires trailing ":" $switch
-> $switch:
Rename @return!
to @return?
and change syntax to require ":" after faults.
Remove if (catch foo) { case ... }
syntax.
Remove [?]
syntax.
Change int!
to int?
syntax.
New fault
declaration using faultdef
.
Enum associated values can reference the calling enum.
Improve error message on foo ?? io::EOF
with missing '?' #2036
Make @public
import recursive. #2018
Fault nameof prefixes the first last module path, for instance std::io::EOF
is rendered as io::EOF
.
Rename def
to alias
.
Change distinct
-> typedef
.
Order of attribute declaration is changed for alias
.
Added LANGUAGE_DEV_VERSION
env constant.
Rename anyfault
-> fault
.
!!foo
now 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.
tmem
is now a variable.
Compile test and benchmark functions when invoking --lsp
#2058 .
Added @format
attribute 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.
import
can 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]
when Foo
is 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 without new_
prefix.
string::new_from_*
changed to string::from_*
.
String.to_utf16_copy
and related changed to String.to_utf16
.
String.to_utf16_tcopy
and related changed to String.to_temp_utf16
mem::temp_new
changed to mem::tnew
.
mem::temp_alloc
and related changed to mem::talloc
.
mem::temp_new_array
changed to mem::temp_array
.
Add ONHEAP
variants for List/HashMap for initializing global maps on the heap.
Remove Vec2 and other aliases from std::math. Replace .length_sq()
with sq_magnitude()
Change all hash functions to have a common hash
function.
@wstring
, @wstring32
, @char32
and @char16
compile time macros added.
Updates to Atomic
to handle distinct types and booleans.
Added math::iota
.
@pool
no longer takes an argument.
Allocator
interface removes mark
and reset
.
DynamicArenaAllocator has changed init function.
Added BackedArenaAllocator
which is allocated to a fixed size, then allocates on the backing allocator and supports mark/reset.
AnyList
now also defaults to the temp allocator.
os::getcwd
and os::get_home_dir
requires an explicit allocator.
file::load_new
and file::load_path_new
removed.
os::exit
and os::fastexit
added.
You canβt perform that action at this time.