Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

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*c
                

      Using parentheses is no longer needed but also no longer allowed

      (re, im) := c*c    # *** no longer supported, causes error
                

      Initialization 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 realtime as the basis for realtime APIs (#5356)

      • tuple: add tuple1, tuple2 etc. for creating tuples (#5385)

        These are convenient, e.g., to zip Sequences as in

        a.zip b tuple2
                    

        instead of

        a.zip b x,y->(x,y)
                    

      • modules: add json_encode (#5350)

      • lib: define writer.finally to 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 effect0 as effect_to_be_instated (#5387)

      • rename handle0/handle2_0 as handle_id/handle2_id (#5388)

      • define mutate local to file, change file.use to use it (#5286)

      • list.as_string, syntax simplification (#5349)

      • total order of complex numbers now takes imaginary part into account (#5336)

    • Removed library features

      • remove choice.type.tag, we can use id instead, e.g., id (option String) "abc" instead of (option String).tag "abc" (#5344)

      • remove envir.vars.get (#5355)

      • In Sequence, removed infix operators !, |& and & to avoid cryptic code. for_each and filter can be used instead (#5327)

  • Parser
    • better source range for errors involving anonymous features (#5424)

    • in loop, use position of else for better error reporting (#5396)

  • Front end
    • AbstractAssign, checkTypes, check for direct assignability since tagging / boxing is already done at this point (#5376)

    • AbstractFeature, cache selfType (#5421)

    • InlineArray, fix target type (#5400)

    • change AbstractType.toString for this-types: now instead of a.this.b.this, print just a.b.this (#5412)

    • error on mismatch of destructured and available argument fields (#5381)

    • explicitly specify if innerFixed in some places (#5420)

    • fix resultTypeIfPresentUrgent for outer ref (#5414)

    • fix handling of open type parameters when resolving types (#5439)

    • fix require-condition when generic sizes don't match (#5347)

    • move resolvedFormalArgumentTypes from Call to AbstractCall (#5432)

    • throw error on calling UnresolvedType.asValue (#5426)

    • isAssignable return YesNo instead of bool enabling suppression of subsequent errors(#5338)

    • fix IndexOutOfBoundsException (#5404)

    • change AbstractType.isAssignable to handle tagging/boxing (#5298)

    • In Tag, move checkChoice to checkTypes phase (#5373)

  • DFA
    • implement comparison of SysArray (#5438)

  • FUIR
    • fix Clazz.findOuter (#5304)

  • JVM back end
    • fix verify error for unreachable code (#5379)

    • improve error message for missing library libfuzion_rt.so (#5348)

  • 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.

last changed: 2025-07-10