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

2025-09-09: Fuzion September Update

One current focus is to use Fuzion's open type parameters for an efficient and type-safe variable argument list mechanism. The idea and a comparison with other languages has been added to the design documents.

  • General
    • The Fuzion team moved to new offices in the FUX

    • Lots of code cleanup, improvements, fixed typos/comments and removed NYIs etc. in more than 50 PRs

  • Fuzion language
    • It is now require for public features and their arguments to have explicit types (#5262). This is to ensure that the types are clearly specified and changes in the feature's code cannot accidentally change the inferred result type.

    • Calling fields with open type (#5681)

      This permits the implementation of fully type-safe variadic functions like printf

        # printf that replaces %0/%1/... by a.0/a.1/...
        #
        printf(A type ..., s String, a A...) : container.typed_fold (s, 0) a
        =>
          public redef apply(T type, e (String, i32), v T) (String, i32)
          =>
            vs := if      T : numeric then "(number: $v)"
                  else if T : String  then "\"$v\""
                  else                     "(*** unknown type `{T.name}` ***)"
            (e.0.replace "%"+e.1 vs, e.1+1)
      
          say res.0
                

      Since code gets specialized for type parameters in the monomorphization phase, the type checking is done fully at compile time. There is no runtime overhead for boxing of values, or for dynamic type checks and it is even possible to cause a compile_time_panic in case of an unexpected type.

    • forbid defining intrinsics outside of base library (#5717)

    • Enable partial application with open type parameters (#5743). This permits calls to, e.g., `tuple` to be used in partial application as in this call to Sequence.zip:

        ["eins","zwei","drei"].zip 1.. tuple |> say
                
      instead of
        ["eins","zwei","drei"].zip 1.. (a,b -> tuple a b) |> say
                

  • Base library
    • New library features

      • Base time add histogram (#5627, #5781, #5782, #5795)

        This helps creating output for timing measurements like this
                   ---  period jitter 3906µs, log count / linear time  ---
        count
        256 _|_______|_______|_______|_______▉_______|_______|_______|_______|_      |
        128  |       |       |       |       ▉       |       |       |       |       |
         64  |       |       |       |      ▉▉       |       |       |       |       |
         32  |       |       |       |    ▉ ▉▉▉▉     |       |       |       |       |
         16 _|_______|_______|_______|____▉_▉▉▉▉▉____|_______|_______|_______|_      |
          8  |       |       |       |    ▉▉▉▉▉▉▉    |       |       |       |       |
          4  |       |       |       |   ▉▉▉▉▉▉▉▉    |       |       |       |       |
          2  |       |       |       |   ▉▉▉▉▉▉▉▉▉▉ ▉|       |       |       |       |
          1 _|_______|_______|_______|___▉▉▉▉▉▉▉▉▉▉▉▉|_______|_______|_______|_      |
             |       |       |       |       |       |       |       |       |       |
           120µs   1081µs  2043µs  3004µs  3966µs  4927µs  5889µs  6850µs  7812µs    >
        
         average |   min   |   max   |  sigma  |  count  |
         3897µs  | 3443µs  | 4777µs  |  172µs  |   536   |
                      

      • Add time.Period and time.frequency for periodic tasks running e.g. 60Hz and avoid problems like the one that resulted in https://www-users.cse.umn.edu/~arnold/disasters/patriot.html, fix #5650 (#5802)

      • fix visibility and add comments to state.fz (#5638)

      • add codepoint.is_ascii_alpha_num (#5727)

      • add os.cwd (#5765), os.max_path_length (#5760)

      • add try.or_try to chain try-blocks (#5746)

      • add atomic increment / decrement for integers (#5695)

      • add feature page_size (#5759)

      • add support for percent encoding (#5747)

      • modules/terminal: Add some more ANSI sequences (clear line, cursor movement, etc.) that might be useful. (#5637)

      • add modules: Database, sqlite (#5753)

    • Changed library features

      • String: fix offset of find when given a second argument (#5815)

      • Make tuple orderable, implement type.equality and type.lteq (#5807)

      • Rename list.scan as list.scan_list, change result of Sequence.scan to Sequence (#5744)

      • io.buffered, limit read_bytes (#5790)

      • lock_free.Map must redefine abstract feature MutableMap.get (#5734)

      • Blocking_Queue fix attempt (#5710)

      • show error code when jvm fails to start (#5654)

  • Parser
    • move parsing of ... after type to formArgs to match EBNF (#5662)

    • Remove value keyword (#5663)

  • Front end
    • Add support for loop variants (#5715).

      Loop variants are a means to validate that a loop terminates. In each loop iteration, the variant calculates an upper bound for the number of remaining loop iterations. This upper bound must decrease monotonically, which can be verified either by static analysis or runtime checks.

      Here is an example to verify that a binary search will terminate: The variant l-r+1 measures the distance between the current left and right indices, while 1 is added to handle the fact that this distance may become -1 in the last iteration:

      binary_search(a array i32, v i32) =>
        for l := 0         , a[m]v ? m-1 : r
            m := (l + r) / 2
        variant (r-l+1).as_i64
        while l < r do
        until a[m]=v then option m
                     else nil
                

    • improve error message for argument count mismatch (#5810)

    • improved error message when float literal assigned to integer (#5783)

    • include generic version of constraint in error message (#5707)

  • DFA
    • move optimizer after DFA (#5721)

  • JVM back end
    • be/jvm: more detailed stack traces (#5796)

  • C back end
    • fix bug that match on void results in C compiler failure (#5647)

    • fix failure when creating jvm on Linux (#5693)

  • Fuzion language server
    • add make lsp/release, make build/lsp.jar (#5664)

    • rename javaModules as modules (#5779)

    • update language server (#5660)

    • integrate language server release into normal release (#5732)

  • Documentation
    • Add definition of template feature to ref manual (#5803)

    • add a section with applicable universe features (#5806)

    • improve accessibility of API docs (#5646)

    • Multiple fixes in the API Docs: hide non public features, fix display of constraints, missing universe comment ( #5817, #5820, #5757, #5819)

    • add missing dependencies for make all to README (#5682)

  • Tests

Cheers,

--The Fuzion Team.

last changed: 2025-09-09