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

2025-10-09: Fuzion October Update

Significant progress has been made in the fzweb web-server during last month. Dependencies on the original Java-based web-server code will soon be fully eliminated and last missing features will be added.

On the Fuzion language side, we saw significant improvements of the handling of open types and lambdas. This lays a basis for processing variable argument lists.

  • Fuzion language
    • Add support to infer partial and lambda from type parameter constraint (#5994)

      This permits better code specialization: Using a function type directly as in

        test(f i32->i32) =>
          say "{type_of f} {f.call 42}"
      
        test x->x+1
        test (-)
        test (3*)
              

      will pass the actual functions as values boxed into a reference of type Function i32 i32 to heap-allocated instances and use dynamic binding for f.call, adding unnecessary overheads.

      Now, we can use a type parameter F with constraint : i32->i32 like this

        test(f F : i32->i32) =>
          say "$F {f.call 42}"
      
        test x->x+1
        test (-)
        test (3*)
              

      and let the compiler specialize the code of test for all actual lambdas passed, i.e., for the internal features created for x->x+1, (-), and (3*). Since the actual values for these features are unit types, the code will get compiled into something like this

        test1 => say "{λ1.type} {λ1.call 42}"
        test2 => say "{λ2.type} {λ2.call 42}"
        test3 => say "{λ3.type} {λ3.call 42}"
        λ1 : Function i32 i32 is public redef call(a i32) i32 => a+1
        λ2 : Function i32 i32 is public redef call(a i32) i32 => -a
        λ3 : Function i32 i32 is public redef call(a i32) i32 => 3*a
      
        test1
        test2
        test3
              

      which uses no references, no dynamic binding, no heap allocation, just code specialized for the actual lambdas (except for the Strings passed to say).

    • It is now possible to use free types as open type parameters (#6022)

      This permits variadic functions to be declared using

        f(a A...) =>
                
      instead of the somewhat clumsy
        f(A type ..., a A...) =>
                

    • Call open type parameter (#5813)

      This permits code like the following

      f(A type ...) =>
        a : container.type_applicator unit is
          public redef apply(T type, e unit) unit =>
            say T
        A.type_foldf unit a
      
      f i32 (option (Sequence String)) void
              

      to iterate over the provided types and produce this output:

      Type of 'i32'
      Type of 'option (Sequence String)'
      Type of 'void'
              
    • Allow open type parameter arguments even if they are not the last argument, fix #5895 (#5925)

      This permits open type parameters from an outer feature to be used as types at any place in the arguments list, e.g.,

      f(A type ...) is
        g(n i32, a A..., b f64) =>
           say "$n $a $b"
      
      (f bool (option String))
        .g 42 true "hi" 3.14
              
  • Base library
    • New library features

      • time.duration is now property.hashable (#5837)

      • add compile_time_panic to statically cause an error in code that should be unreachable (#5851)

      • add frequency.as_string (#5887)

      • Add Typed_Sequence.variadic, minor cleanup (#5897)

      • add Any.dynamic_apply and Typed_Function that extracting the type and value from a referenced of type Any (#5896)

      • add os.mmap_offset_multiple (#5890)

      • add stat.meta_data.as_string (#5930)

      • add trit.is_yes, is_no, is_unknown etc. (#5942)

      • add Sequence.as_ordered_map and Sequence.as_hash_map to create a map from the values in a Sequence (#5888)

      • add effect Buffer_Size for central configuration of buffer size (#5958)

      • add (infix) set operators (symmetric difference), (is subset of), (is superset of), and (contains and contains not) (#5960)

      • Add variants of String .trim/trim_start/trim_end with custom conditions on what to codepoints or utf8-bytes to trim (#5986)

      • process(es) implement as_string (#5997)

      • add switch.fold (#5999)

    • Changed library features

      • Added redef Typed_Sequence.finite since Typed_Sequence is always known to be finite (#5827)

      • fix type parameter constraint in Clock.run_periodic (#5859)

      • change visbilities of handles(2)/bitset (#5860)

      • process.wait add timeout parameter (#5862)

      • relax preconditions for ordered_map/hash_map to avoid counting for debug level below 2 (#5898)

      • make tuple inherit property.hashable using typed_foldf on open type values field (#5882)

      • improve hash_map's collision handling for poor hash functions (#5886)

      • os: add upper bound for polling_time when waiting on process (#5907)

      • fix Sequence.find performance problem due to too many calls to Sequence.count an non-array-backed Sequences (#5934)

      • fix abstract_array.drop for negative n, implement abstract_array.take (#5933)

      • fix Sequence.is_valid_index that false returned true for the first invalid index (#5932)

      • replace some fixed constants in io and network APIs by page_size/max_path_length (#5953)

      • fix slice of slice by redefining slice in array_slice (#5956)

      • implement array_slice as an abstract_array (#5951)

      • remove double buffering from buffered reader (#5957)

      • extend Sequence.split_at to permit a predicate on the element type as an argument instead of the index (#5972)

      • Sequence, find/replace now first make sure the underlying Sequence is array backed for better performance (#5983)

      • rename Sequence.average as Sequence.mean (#6017)

      • rename as_codepoints as codepoints (#5991)

      • improve comment in bitset (#5869)

      • Sequence.take/drop document behavior for negative argument (#5931)

      • expanding_array, fix comment (#5959)

    • update to Unicode 17 (#5992)

  • Shared Library (native features)
    • include: fix incoherence between fz.h and shared.c (#5911)

  • Modules
    • json_encode: add abstract Any.json_members (#5952)

    • HTTP module

      • avoid creating maps twice (#5899)

      • remove canonical header map (#5945)

      • change argument type to Sequence from array (#5982)

      • use the words in full in feature names (#5993)

  • Parser
    • fix #1022, confusing indentation related error (#5831)

  • Front end
    • cleanup in AbstractType.applyTypeParsLocally (#5814)

    • fix require condition failure for non-loaded features (#5833)

    • fix inheriting from feature with open type parameters (#5838)

    • fix check-condition: IncompleteType.java:47 (#5847)

    • fix check condition failure in man_or_boy2 (#5855)

    • fix soundness issue in constraintAssignableFrom (#5786)

    • Fix check condition failure when comparing tuples (#5871)

    • fix AbstractFeature.toString when very early in front-end (#5917)

    • fix result type propagation to loops (#5904) (#5918)

    • fix using open type parameters in inherited feature (#5944)

    • fix open type parameters inherited from type parameter constraints (#5962)

    • fix null pointer exception (#6003)

  • Monomorphization/DFA
    • remove special clazz c_Array (#5906)

    • use Bitset for _accessedSites (#5965)

    • cache lookup (#5964)

  • JVM back end
    • normalize output of filenames in stack traces (#5829)

    • add missing space in error string (#5901)

  • C back end
    • do not destroy JVM in each thread, fix #5912 (#5913)

  • Interpreter back end
    • fix an issue where exit 0 caused a require condition failure in the interpreter (#5824) (#5839)

  • Tools
    • fz

      • fix confusing missing module file error (#5865)

      • timer: split dfa into dfa1 and dfa2 (#5876)

      • Show failing pre/post/check condition even if it comes from generated code (#5877)

      • improve terminal detection (#5881)

      • dfa: verbosity level 2, add info on how many iterations DFA took (#6015)

      • don't silently ignore if universe.fz was not found (#5832)

      • add hint on how to start profiler not at app start (#5921)

    • fzjava

      • Allow passing nil when java string is expected (#6008)

        In code generated by fzjava, arguments that are a String on the Java side now take an option String on the Fuzion side. nil will be passed as a null in Java.

        This means it is now possible to do

                        Java.java.lang.System.out.println nil
                      

  • Documentation
    • add hyperlink to constraint of type parameters (#5830)

    • profiling add section for java flight recorder (#5858)

    • allow code in universe comment (#5870)

  • Tests
    • tests: re-add show slowest tests in test run (#5836)

    • run_tests: cleanup remove use of timeout (#5875)

    • run_tests: don't panic on test timeout (#5889)

    • fix and rerecord test mod_http_message (#5920)

    • strip line numbers from jvm stack traces (#5926)

    • check_simple_example: use os.cwd to replace with CURDIR (#5939)

    • run_tests: emit histogram of test times (#6016)

    • run_tests: change design of output (#6006)

    • run_tests: histogram, add argument max_recorded (#6019)

  • Windows
    • fix hang in sleep, don't use WaitForSingleObject with 0 timeout (#5880)

    • fix failing tests due to failed path replacement (#5970)

  • Build Tooling
    • automatically deploy git version of api docs to fuzion-lang.dev (#5852)

    • Makefile: compile run_tests.fz in a separate target (#5863)

    • Makefile: fix error caused by missing directory build/include/ (#5873)

    • makefile: build/bin/run_tests add dep on $(FZ_SRC)/bin/run_tests.fz (#5879)

Cheers,

--The Fuzion Team.

last changed: 2025-10-09