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

2026-11-16: Fuzion November Update

Highlights of last month are compile-time reflection with new features that support inspecting arbitrary choice types and more extensive use of type parameters to allow specialization, e.g., for Sequence.map to remove function argument passing and dynamic binding overhead.

  • Fuzion language
    • free types are always inferred from actual arguments (#8069)

      This means that you can now influence if a type parameter may be given explicitly as in

        add(N type : numeric, a, b N) N
        =>
          a + b
                
      which can be called with or without the type parameter
        pi    := add f64 3 0.14  # using explicit type parameter
        seven := add _ 3 4       # using inferred type parameter
        ten   := add 4 6         # also using inferred type parameter
                
      while using a free type
        add(a, b N : numeric) N
        =>
          a + b
                
      is always inferred, i.e., must not be given:
        pi    := add 3 0.14  # inferred f64
        seven := add 3 4     # inferred i64
        ten   := add 4 6     # inferred i64
                
      This makes the number of required actual arguments more obvious and avoids the need to specify _ type parameters if some type parameters can be inferred.

  • Base library
    • New library features

      • choice now supports compile-time reflection via choice.ordinal, choice.apply, and choice.combine: fix #5793 (#7765, #7943, #7953, #8040)

        This made it possible to implement a generic choice.as_string and to make choice orderable and hashable.

        The code to implement choice.as_string using apply is magically simple:

          public redef as_string String
          =>
            apply (_,v -> $v)
                      
        It works as follows: apply is an intrinsic that expects a Typed_Function as an argument and calls that function with the type and value stored in the choice. For, e.g, choice red green blue, the compiler creates an apply function as follows
          public apply(R type : Any,
                       F type : Typed_Function R,
                       f F
                       ) R
          =>
            match choice.this
              v0 red   => f.call red   v0
              v1 green => f.call green v1
              v2 blue  => f.call blue  v2
                      
        Effectively, apply provides a generic match.

        To make choice orderable, we needed a generic implementation of type.lteq for any choice.this. This is done as follows:

          public redef type.lteq(a, b choice.this) bool
          =>
            a.combine b (i64.lteq a.ordinal b.ordinal) T,va,vb->
              if T : property.orderable then
                T.lteq va vb
              else
                compile_time_panic
                      
        This uses combine which also receives a Typed_Function that is called from compiler generated code iff both choices have the same ordinal number. So we can use that to compile-time type check if the element type is orderable and use that type's lteq implementation. Otherwise, combine will return its second argument, which is the result of comparing both choice's oridinal values using i64.lteq.

      • Sequence.map is now specialized for its function argument. This is possible since it no longer takes a reference f Function R T argument, but uses a free type parameter f F : Functgion R T (#8075).

        The result is that, e.g, [1,2,3].map +3 will automatically get specialized for the given operation, i.e., we have [1,2,3].map_add3 without a function argument and without dynamic binding overhead.

      • New APIs for thread and process time: add time.Thread_Time and time.Process_Time (#7979, #8017)

      • f64/float/data_size: add f64.as_u128 and remove NYI hack in units.data_size.scale_approx (#7753)

    • Changed library features

      • change internal_array.length type to i64 (#7998)

      • fix f32.fits_in_i64 accepting 2^63 (#7967)

      • fix intrinsic definitions: cnd_timedwait/cnd_init (#7995)

      • fix snapshot bug in ctrie (#8066)

      • make typed_zipper a lambda-target (#7977)

      • move string cut result to universe (#8087)

      • processes do not remove process from processes on successful wait (#7970)

      • run finallies of default effects in reverse order (#8091)

      • Replace switch.ok by switch.postfix ?? or similar (#7722)

    • Removed library features

      • remove ≟, ⩻ and ⩼ operators (#7906)

      • remove internal_array.ensure_not_frozen and internal_array.freeze (#7999)

      • remove time.Clock.run_once (#8002)

      • remove typed zipper (#7978)

      • remove unused feature concur.util (#7945)

  • Other library modules
    • tokiwa module

      • modules/tokiwa: improve error message for process timeout (#8028)

      • tokiwa: on wait failure, output what was recorded so far (#7837)

  • Parser
    • allow multi-line string continuations after interpolation (#8027)

    • don't return error token when string constant unexpectedly ends (#8058)

    • don't treat call tail as an argument in multi-line calls (#8054)

    • require white space between arguments (#7946)

  • Front end
    • Add call to resolveDeclarations before calling constraint on type parameter (#8095)

    • cache AbstractCase.tags, found this while profiling (#8022)

    • clarify error for value argument given as type (#8016)

    • do not expose Expr.visit to other packages (#8056)

    • fix ParsedCall.splitOffTypeArgs to ignore free type args (#8074)

    • cleanup: Move Function.NO_CALLS to AbstractCall (#7948)

    • make Expr.unwrap tolerant if type of expression is unknown, fix #8086 (#8089)

    • fix comments on module hash sizes (#8111)

    • allow choice with redundant types, only forbid match if ambiguous (#7935)

    • Call, handle case when target of target is erroneous. (#7984)

    • cleanup: Implement more scalable compareTo for different Features (#7923)

    • cleanup in reporting of duplicate argument names (#8062)

    • remove type par caching (#8030)

    • rename AbstractType.isUnitType (#7969)

    • test removing rebaseTypeForCotype (#8053)

    • Type inference from actual type parameters, fix #7791 (#8006)

    • fix IndexOutOfBoundsException after errors found during type inference fix #8084 (#8085)

  • Monomorphization/DFA
    • Call.compareToWhy, list all differences (#7917)

    • consider two null envs to be same (#7916)

    • on verbose=4 list 25 most used values/calls (#7918)

    • refine newValueConst, add precondition to CallGroup (#7966)

    • refine setField precondition (#7957)

    • remove dead code (#8107)

    • remove UNKNOWN_JAVA_REF (#7960)

    • remove unused _clazzesThatRequireEffect (#8032)

    • remove unused Value.UNDEFINED (#7956)

    • set correct clazz for SysArray (#7958)

    • set _preEffectValues to null (#8023)

    • use only one instance if clazz at site is not siteSensitive (#7934)

  • Middle end
    • cfg: remove dead code (#8109)

    • add FuirFeature abstraction of LibraryFeature and future FUIR generated features (#7950)

    • ignore dead ends during tail call detection (#8060)

    • TailCall: update comments referring to call site (#8057)

    • cache Clazz.feature() (#8068)

    • error on self recursive types (#7987, #8020)

      Code like this

        test(T type) =>
          i is
          test i
      
        test i64
                
      would produce an endless chain of types test (test ... (test (test i64).i)... .i).i and crash the compiler. This now results in a propper error.

    • find redefinition without lookup by name (#7959)

    • change toStackIR to eval potential side effects of dumped InlineArray (#8093)

    • do not add type parameter calls to stack (#8055)

    • XdumpFUIR: always serializeFuir (#7940)

  • Backends
    • C backend

    • JVM backend

      • extend setMemSeg implementation (#8123)

      • fix Load.buildLineNumberTable (#8112)

      • fix two correctness issues found by DeepSeek (#8122)

      • hasClassFile, return false for intrinsics (#8088)

    • Interpreter backend

      • Fix different process timeout behaviour between Linux/macOS and Windows, fix #8031 (#8042)

      • fix require-condition in interpreter (#7910)

      • remove orphaned code (#8110)

      • make source position format in stacktrace match jvm backend (#7976)

  • Windows
    • fzE_nanosleep, do not call fzE_posix_time in the loop (#7968)

    • on pipe close cancel IO (#7981)

    • fix dll not found (#7921)

    • fix process timeout behaviour (#8035)

  • Tests
    • add additional test from issue #7791 to corresponding regression test (#8072)

    • add reg test for (seemingly fixed) #7417 (#8038)

    • add reg tests for (seemingly) fixed bug #7232 (#8033)

    • add test dump_fuir (#7963)

    • avoid copied code from module tokiwa where possible (#7996)

    • fix test recording (#8121)

    • comment out now working case in inference_choice_generics (#8116)

    • fix compile.mk for examples containing code in universe (#8019)

    • update fixed reg test #2111 (#8115)

    • update interpreter recordings (#7997)

    • skip blocking_mutate_timeout for now (#7989)

  • Language Server
    • remove dead code, found by AI (#7914)

    • vibe coded reliability of lsp test (#8120)

  • Build Infrastructure
    • make simple_example.fz honor skip files in Fuzion repo (#8051)

    • make simple_example.fz thread-safe by naming tmp files after tests (#8007)

    • only keep filename in expected error, remove (relative) paths (#7988)

    • simplify path and line number replacement in simple_example.fz (#8009)

    • support setting debug level via comment in test (#8052)

  • Documentation
    • improve display of type parameters and free types (#8097)

    • examples/jitter: fix string interpolation in overrun message (#8003)

    • examples/jitter: report CPU time of payload on overrun (#8004)

  • Fuzion Webserver
    • add not_executable option (#485)

    • Blocklists, Feeds: use concur.atomic_mutate (#487)

    • Blocklists, Feeds: use put instead of update (#488)

    • connection_handler: cleanup code (#501)

    • fix benchmark compilation (#491)

    • Jenkins: include default recipients in failure emails (#492)

    • minor cleanup: pass on read error when reading form data (#497)

    • README: adjust to current reality (#490)

    • reduce visibility of event_msg (#502)

    • session_document: support boolean attributes, improve attribute parsing (#499)

    • src/Session: ensure user authentication consistency by blocking mutate (#486)

    • src/Session: use blocking_mutate for history (#489)

    • src/user: fix stringification of time when moving deleted users (#493)

    • src/user: move deleted users into subdirectory of users (#495)

    • src/user: send email after successfully deleting an account (#496)

Cheers,

--The Fuzion Team.

last changed: 2026-11-17