Changes / improvements
- Removed "old-enums, old-slice-copy and old-compact-eq" feature flags.
- Removed deprecated
$evaltype. - Removed all deprecated (as of 0.7.11) types and functions from the stdlib.
- Removed deprecated
iXXanduXXsuffixes. - Removed deprecated
Enum.lookup. - Removed deprecated
?as suffix operator in the expressionio::EOF?. - Removed deprecated
module foo {Type}generic syntax. - Distinct types now defaults to be "structlike"
- Removed
@structlikeattribute. - Removed deprecated
@externattribute. :in contracts before description is now mandatory.- Removed deprecated
Enum.associated(useEnum.membersof). - Removed deprecated
Enum.elements(useEnum.len). - Removed deprecated
foo_function.params(usefoo_function.paramsof). - Removed deprecated
$is_const. - Removed deprecated
$assignable. - Enums now no longer directly support
+and-– use ordinals instead. - For enums, using
++and--will step through enums with implicit wrap-around. - Rename
isz->sz. - Make $sizeof, $alignof and all similar functions return
szinstead ofusz. - Align literal types with C semantics.
- Use value promotion instead of signedness promotion to int. So that small unsigned types promote to int, not uint.
- Add a
@mustinitattribute to enforce zero-initialization of a type. #3094 - Improve error message when keyword is used instead of an expression. #3088
- Add
--warn-recursivecontracts. - Mutex.destroy and friends no longer return optionals.
- Remove
@operator(!=)overload. - Add
@operator(<)overload, enabling type comparison overloads. - Generic inference can now look through pointer.
- Enums now implicitly convert to their ordinal when used as indices.
- Enums can no longer declare themselves
inline. - Nested generics allowed inside generic functions/methods.
a = ...parameters may be shadowed if not defined.$evalcan now be used with named parameters, e.g.foo($eval("arg"): 2)#3090- Type properties are now accessed using
::and the "of" suffix, removed:int.sizeof->int::size - Added
$reflectwith propertiesname,cname,qname,offset,alignment,size. - Added
@kindof,@alignofand@sizeofmacros. - Removed
$nameof,$extnameof,$qnameof,$offsetof,$alignof,$kindof,$sizeof. .nameofis changed to.descriptiononfaultand enum types.- Type property
is_eqis renamedhas_equals. - Type function
tagofis renamedget_tag. - Add
untypedlistas a usable type #2647. ??and?:has new precedence and binds tighter than+and-- Added the
tagsproperty for types and$reflect. - Allow taking the type of an interface method.
- Add
$expandcompile time function to convert strings to code. - Constdef now infers through unary negations.
- Only used libraries are scanned for dependencies. #3144
$vaconst,$vaexprand$vatyperemoved.- Improve error message on unsupported typeid runtime access at runtime. #3170
- Added support for Emscripten.
- Replace
$vacountby$vaarg.len, replace$vasplatby...$vaarg. $vaargbehaves as$vaexpr.- Added
docgencommand to generate documentation. - Added
jmpabsx86 CPU feature. - Implicit unsigned <-> signed integer conversions removed.
- Added C3 Compiler setup installer for Windows
alias Foo = int::typeidnow works.$typeof=>$Typeof,$typefrom=>$Typefrom.
Stdlib changes
- Add
List.remove_unordered_at. - PanicFn now takes an
intfor row. - Add
std::collections::Deque. - Add
compare_toandcompare_to_ignore_casetoString. #3096 - Add
SortedMapbased on skip lists. - Add
OneShotChanneltostd::thread::channelfor single-send/single-receive thread synchronization. BufferedChannelandUnbufferedChannelare now pointers, create usingcreate_unbufferedandcreate_bufferedRingBuffernow conforms toforeachand adds additional functions.- Ini parser and encoder.
- Updated
ref::newargument order. - Support setting thread stack size.
- Support setting thread priority.
- Support syscall on RISCV.
- Make
DString.append_repeatpolymorphic addingappend_string_repeatandappend_char_repeat. - Add
DString.append_inlinefor optimized uses. - Ordering of
object::new_*arguments are now "allocator first". - Add
remove_unordered_atto FixedList. - Changed
jsonto support two flavors of JSON: JSON and JSONC. - Changed
jsonAPI:parse->load,parse_string->parse. conv::detect_bom, convert utf16/utf32 from bytes with byteswap / unaligned data.- Mergesort added.
set_cursoris renamedseek, and the oldseekis removed.std::mathname changes:HALF_PI=>HALF_PI,QUARTER_PI=>QUARTER_PI,DIV_PI=>INV_PIetc,cosec=>csc,cotan=>cot,muladd=>madstd::timename changes:diff_hour=>diff_hours.DateTime.set_date=>DateTime.set,datetime::from_date_*=>datetime::at_*std::hashmethod name convention changes:updatec/update_char=>update_byte.std::stringname changes:strip=>strip_prefix,strip_end=>strip_suffix.std::collections::objectaddedObject.to_valueto convert from an object to a value.std::encoding::xmladded for XML parsing and serialization.- Fix
Path.appendseparator not honoring the specified environment. - Add multi part and extension support to
Path.append. - The
PathAPI now is split intoPathPosixandPathWin,Pathis implicitly castable toStringand loses thestr_view()method. Usepath::tnewinstead ofpath::tempfor a temporary path.
Fixes
- Slice comparison lowering would not work correctly in macros in some cases. #3095
- Attributes
@allow_deprecated,@constinit,@noalias,@nostrip, and@optionalwould erroneously accept parameters. #3098 - Fix pipe handle leaks across concurrent process spawns #10067.
$$trapwas incorrectly marked noreturn.- Recursive inclusion of contracts was not detected.
\rwas not filtered when piping a source file from stdin.- SHA-3 and Keccak contexts are now explicitly
@mustinitstructures. #3110 UnbufferedChannelwould deadlock on multiple producers.- Don't override
sigaltstackwhen running with--sanitize=address. #3115 - Binary search broken for some supported functions.
- Fix bug casting
(void*[<3>])x. - Compiler crash compiling a switch with a constant case range overlapping a constant case value. #3127
- Incorrect handling of overaligned struct fields #3136
- EnumSet with more than 128 entries was broken.
- Handle underflow in zip.
- Bugs in check for name suggestions on name mismatch.
- Fix bug where only one ensure would not be inlined correctly. #3162
- Incorrect error message when casting to non-existent enum.
- Macro
$Type = ...would not work correctly with$defined - Fix enum value handling in
Object(std::collections::object) to conform with changes in enums. - Compiler assert in certain cases with ?? and void returns. #3168
- Bug in compiler-rt for i128 shift.
- LinkedBlockingQueue.push_timeout did not work correctly.
- Splat into vaarg macro, where vaarg is not used #2782.
- Comparison with floats had incorrect codegen, leading to incorrect results for NaN #3175.
- Zeroing out simd vectors in a struct could in some cases lead to incorrect lowering #3179.
- Incorrect lowering when returning a struct to an optional value on Win64 in some cases #3180.
- Fix bug where a method is considered doubly generic if declared in a generic module for a generic type. #3176
- Fix exp10 on platforms without exp10 as an LLVM builtin.
- LLVM 23 compatibility: map
Os/OztoO2pass pipeline, fixreturnaddressintrinsic signature, addoptsize/minsizefunction attributes. - Warning for ignored visibility modifiers was not emitted for macro methods #3071
while (String? x = foo()!)was accidentally allowed causing a lowering error.- Crash casting uint to bitstruct inside struct field assignment #3187
- Vec2/Vec3 transform missed matrix translation.
- Matrix rotation ignored matrix itself.
- Fix BigInt shr, to_format, and others.
- Fix ends in TDist.quantile, FDist.pdf, ChiSquaredDist.pdf
- Fix to easing expo_in and bounce_inout.
dequewith shrinking a zero sized list caused infinite loop.- Printing an enummap yielded the wrong character count.
- Incorrect contract in
FixedListallowed insert out of range. - Fix double-free in InterfaceList.
- Object.set_at was incorrect.
- Bitstruct with backing char[n] would occasionally be incorrectly stored.
- fmuladd lowering crashes on
a + -(b * c)with fastmath. - Constant folding
-30 % -7would incorrectly yield "2". - Parsing << in asm would not be correctly handled.