2025-07-10: Fuzion July Update
Last month brought some nice language improvements for destructuring, nullary functions and automatic unwrapping and a number of enhancements in the base library and bug fixes and cleanup in the tools.
- General
-
Within the GreenCode project, we have started collecting requirements for realtime APIs including features to monitor resource usage and enforce limits.
-
- Fuzion language
-
Field declaration now supports destructuring simplifying the grammar and the code (#5173)
To destructure a complex number, you can now write
c := num.complex 1 2 re, im := c*cUsing parentheses is no longer needed but also no longer allowed
(re, im) := c*c # *** no longer supported, causes errorInitialization of several fields using a tuple requires parentheses only on the right hand side:
one, two, three := (1, 2, 3) -
Support type inference for nullary lambda expressions, fix #1015 (#5308)
So, we no longer need to specify a type in declarations like this:
f := () -> say "hello" f.call -
auto unwrap target of call if necessary (#5362)
This permits code like the following without explicitly unwrapping mutable variables
a := mut.new 3 b := mut.new 4 say a+b
-
- Base library
-
New library features
process.send_signal(#5351)switch.or_cause, unwrap or cause exception (#5322)add
Sequence.is_sorted(#5383)add unit-type feature
realtimeas the basis for realtime APIs (#5356)-
tuple: add
tuple1,tuple2etc. for creating tuples (#5385)These are convenient, e.g., to
zipSequences as ina.zip b tuple2instead of
a.zip b x,y->(x,y) modules: add
json_encode(#5350)lib: define
writer.finallyto flush when deinstating effect (#5319)
-
Changed library features
fix precondition of
container.ordered_map(#5386)improve error messages in
fuzion.sys.fileio(#5340)net, improve error messages (#5357)rename
effect0aseffect_to_be_instated(#5387)rename
handle0/handle2_0ashandle_id/handle2_id(#5388)define
mutatelocal to file, changefile.useto use it (#5286)list.as_string, syntax simplification (#5349)
total order of complex numbers now takes imaginary part into account (#5336)
-
Removed library features
-
- Parser
- Front end
AbstractAssign,checkTypes, check for direct assignability since tagging / boxing is already done at this point (#5376)AbstractFeature, cacheselfType(#5421)InlineArray, fix target type (#5400)change
AbstractType.toStringfor this-types: now instead ofa.this.b.this, print justa.b.this(#5412)error on mismatch of destructured and available argument fields (#5381)
explicitly specify if
innerFixedin some places (#5420)fix
resultTypeIfPresentUrgentfor outer ref (#5414)fix handling of open type parameters when resolving types (#5439)
fix require-condition when generic sizes don't match (#5347)
move
resolvedFormalArgumentTypesfromCalltoAbstractCall(#5432)throw error on calling
UnresolvedType.asValue(#5426)isAssignablereturnYesNoinstead ofboolenabling suppression of subsequent errors(#5338)fix
IndexOutOfBoundsException(#5404)change
AbstractType.isAssignableto handle tagging/boxing (#5298)In
Tag, movecheckChoicetocheckTypesphase (#5373)
- DFA
implement comparison of
SysArray(#5438)
- FUIR
fix
Clazz.findOuter(#5304)
- JVM back end
- Windows
fix windows build (#5371)
- Documentation
fix asciidoc code for Match entry in fum file (#5406)
in API docs: improve alignment in feature list (#5390)
fix links of base module feature displayed in other modules (#5403)
fix missing comments in API docs (#5392)
for function features hide inner (inherited) functions and fields (#5389)
require leading blank line for code blocks in comments (#5393)
- Tests
tests: add output to
compile.mk/fe.mk(#5329)
- Examples
add test for pkg-config and gtk, documentation (#5380)
Cheers,
--The Fuzion Team.