Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal

2025-05-13: Fuzion May Update

Last month saw a large number of minor fixes in the Fuzion language, compiler and base library combined with some larger progress towards native library interfacing via value types and callbacks.

  • General
    • We thank Nina Hinkkanen for her work as an intern and wish her all the best for her future in the cyber security field!

  • Fuzion language
    • add support for none lib features for short hand access of open type parameters (#5166). This permits, e.g., base library code code like

        items := [(1,"eins"),(2,"zwei")]
        keys := a.map items->items.values.0
        vals := a.map items->items.values.1
              

      to be written as

        items := [(1,"eins"),(2,"zwei")]
        keys := a.map (.0)
        vals := a.map (.1)
              
    • remove support for double-slash comments (#5075). Single line comments must be introduced using # now as in

        beast := 666   # chapter 13, verse 18 of the Book of Revelation
              
  • Parser
    • Improved error output for Qualifier expected for '.this' expression errors, fix #5156 (#5157, #5159)

  • Front end
    • add impl. restriction error for unsupported contracts such as preconditions for fields or postconditions for intrinsics (#5009)

    • avoid errors caused by additional lambda argument (#4986)

    • avoid NullPointerException to fix #5114 (#5129)

    • do not suppress inline code for ? : in case of previous errors (which resulted in additional, confusing errors), fix #5114 (#5142)

    • extend syntax sugar to convert numliterals to required type (#4981). This simplifies type generic code for numeric types such that instead of

        triple(n T : numeric) => n * T.from_u32 3
              

      you can now write

        triple(n T : numeric) => n * 3
              

      and then use this, e.g., as follows

        triple (complex 2 3) |> say  # will print `6+9i`
              
    • fix crash when trying to infer result type of lambda with no arguments (#5020)

    • Fix position of inheritance calls generated for cotype, fix #5003 (#5005)

    • improve error when failing to resolve partial application (#5032)

    • raise better error for say <| ([0,1,2].map 42) (#5040)

    • specify possible argument count for suggested features in error message (#5017)

    • AstErrors, fix NPE (#5109)

    • fix crash when failing to infer type parameters in call (#5024)

    • fix scoped visibility handling for extension features, fix #5082 (#5084)

    • raise error when adding field without parent in module (#5023)

    • Select, fix NPE (#5132)

    • suppress subsequent error on argument count in #5114 (#5131)

    • Fix 4992: Type constraint using.this results in error (#5000)

  • Middle End
    • fix unjustified error for reading uninitialized field created by DFA (#5094)

    • fuir: clazzOuterRef now always return NO_CLAZZ for native, fields etc. (#5012)

  • JVM and C back end
    • jvm: change type of functions descriptor args array (#5011)

    • c: convert some functions to windows native (#5074)

    • c: zero memory (securely) (#5034)

    • c/jvm: add initial support for native values (#5021)

  • Windows
    • fzE_date_time add support for nano seconds (#5089)

    • build args and env in win.c (#5087)

    • fix fzE_dir_read, exclude NULL-byte from length (#5081)

    • fix problems related to tests/process_utf8 (#5096)

    • fix test process (#5091)

    • use wide char api explicitly (#5028)

    • install libsqlite via msys (#5103)

    • readd workaround for unicode problem (#5101)

    • tests: add skip_win option (#5105)

    • create link libclang.dll, clang.dll (#5033)

  • fz tool
    • changed all options to camelCase (#5150)

  • Base library
    • New base library features

      • add order, choice of less/greater/equal as result type for infix ⋄ instead of magic constants -1, 0 and +1 (#5118, #5133)

      • add String.lines, splitting the String at \n (#5154)

      • add process.close_in to close standard input (#5108)

      • implement calendar.duration.type.lteq (#5112)

      • String add write_to, writing String to installed writer (#5123)

      • write_result, add ok, shorthand to check if writing was successful (#5155)

    • Changes to the following standard library features

      • change ordered_map arg types to Sequence (#5136)

      • make String.trim_start/trim_end public (#5158)

      • fix argument order inconsistency in scan and fold in Sequence (#5004)

      • fix hierarchy of faults, contract_fault now used by pre_fault, post_fault, and check_fault, (#5139)

      • make Lazy inherit from monad (#5036)

      • mark bind in outcome as fixed, so parse_result can reuse the name (#5010)

      • mark Set.add as abstract (#5113, #5167)

      • rename try as exception (#5117)

    • Removed library features

      • remove num.sign (#5127)

      • made type_of lazy and removed type_of_lazy (#5053)

  • Tests
    • test: use run_tests.fz (#5134)

    • tests add reg. test #1726 (#5031)

    • tests: add reg. test #2701 (#5035)

    • tests: add test #4422 (#5037)

    • tests: call wait at the end, did only work because of buffering (#5098)

    • tests: change test process to print complete env (#5083)

    • tests: file/dir, use unicode symbols (#5027)

    • tests: fix comments in tests/visibility_scoping (#5093)

    • tests: include target when generating rerun command (#5066)

    • tests: try workaround broken pipe problem (#5088)

    • skip native_value test on jvm backend because of #5026 (#5044)

  • Documentation
    • fixed links to features in other modules (e.g., when inheriting from feature in different module (#5014)

  • Build infrastructure
    • port run_tests to Fuzion (#5110)

    • run_tests: fix failing precondition in failed tests enumeration (#5168)

    • run windows tests every workday (#5143)

    • makefile: add helper to rerecord effects (#5144)

    • Makefile: include API docs in make target doc (#5079)

    • workflow: programmatically determine clang major version (#5029)

    • Switched to long options (#5107)

  • Fuzion Idioms
    • Added new idioms #315, #330, #332, #336, #340, #342.

Cheers,

--The Fuzion Team.

last changed: 2025-05-15