You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coroutines with a scheduler. Only Linux/macOS for now, requires -use-coroutines and coroutines.sleep() instead of time.sleep(). They work with IO and net, but not with GC
for now.
spawn now spawns system threads, go spawns coroutines.
Static type methods: Foo.new() to replace factory functions like new_foo().
Smartcasting with complex conditions:if sum_type is Foo && !sum_type.is_info && get_name(sum_type.info.name) == 'foo' .
Functions can now return fixed size arrays.
Enum values now can have attributes.
Generic functions as function parameters are now supported: fn f[T](x T, i int, f_ Fn[T]) T { .
Anonymous structs can no longer have attributes.
Allow fixed array returns.
Breaking changes
byte deprecated in favor of u8 (byte is automatically converted to u8 by vfmt).
Checker improvements/fixes
Disallow Result type aliases (type Foo = !Bar) and Result in maps (map[key]!Type).
Add a missing check for taking address of literal value member.
Fixed map initialization for maps with option values.
Allow a << none, where a is []?&int.
Disallow multiple else branches in a match.
Fix index expression with sumtype of array types.
Remove hardcoded check for function calls for C.stat, C.sigaction, etc.
Fix multiple embedded external module interface.
Fix missing check for diff type on map value declaration.
A hard to reach limit of 1 million iterations for resolving all generics.
Fix missing check for unwrapped shift operation.
Fix enum max value validation.
Add a missing mutability check for array.delete calls.
Disallow _ = <- quit.
Disallow type matching with primitive vars.
Warning instead of error for unnecessary brackets in if/match.
Include import aliases when checking for import duplicates.
Fix infering generic array type in nested call.
Allow casted enum val and const as fixed array size.
Disallow multiple return values in const declarations.
Fix contains() with array of interfaces.
Disallow mut for blank idents.
Standard library
json: Enum value string serialization supports [json:'alias'] to change its string values.
Struct fields can now be skipped during JSON/ORM serialization via [json:'-'] and [sql:'-'],
in addition to [skip]. This allows having custom behavior for different serialization methods.
builtin: heap usage API (gc_memory_use() and gc_heap_usage())