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

2024-05-17: Fuzion May Update

Clarification of multiple-inheritance semantics and redefinition paired with massive performance improvements in the front end were last month's main changes.

  • General
    • Tokiwa is a partner in the GreenCode consortium in the ITEA4 cluster, where we plan to work on the Fuzion language and tools to make code greener.

    • Work on a Fuzion module for a nom-like parser combinator framework has started (#2808)

  • Documentation
    • readme: add section for installing Fuzion from package manger (#2919)

    • ref_manual: Add more examples for comments and strings (#2939)

  • Build infrastructure
    • run_tests: add workaround for macOS (#3017)

    • run_tests: show total time (#2946)

  • Fuzion language
    • A string literal containing exactly one codepoint is now of type codepoint, which inherits from String (#2676). This permits writing

            code := "࿋".val                        # results in `4043`
              

      instead of

            code := "࿋".as_codepoints.first.val    # results in `4043`
              
    • Support for multiple inheritance and redefinition of several features (#3034)

    • Extend type visibility into type features (#2999)

      e.g., in

            abc is
              def is
      
              type.test(x abc.def) is
                say x
              

      it is no longer required to qualify the type abc.def, one can use def instead:

            abc is
              def is
      
              type.test(x def) is
                say x
              
    • pre/post conditions in redef-ined features now need else/then to clarify that preconditions are weakened and postconditions are strengthened (#3023)

    • A new effect fuzion.runtime.fault was added to be used to permit handling of failed pre/post conditions in applications. Support check expressions to use this effect was added (#2996, #3011)

    • Fix #2224: precondition of abstract features (#2962)

    • Visibility modifiers are no longer allowed within inner blocks (#2864)

  • Base library
    • Addition of the following new standard library features

      • union/intersection/except etc. in Set (#2904)

      • Map.type.empty (#2831)

      • as_persistent_map to lock_free.map (#2977)

      • container.Persistent_Map (#2960)

      • io.buffered.read_line_while (#2881)

      • option/outcome: prefix ! (#2834)

      • In Buffer, add redef as_string (#3024)

      • Add general definition of a mutable map (#2832)

    • Removal of the following standard library features

      • numeric.to_u32 (#3026)

      • set from ps_map and sorted_array (#2852)

      • All uses of thiz in numeric types (#3038)

      • Effect map_of_total_order (#2833)

      • fuzion.java.Java_Object._ignore_ (#2923)

    • Changes to the following standard library features

      • Any.as_string is no longer an intrinsic but implemented in Fuzion directly(#2893)

      • Rename option.get default to option.or default (#2925)

      • For sets, maps and lists, renamed type.from_sequence to type.new (#2873)

      • Split up file.write and make dir effect (#2982)

      • In spawn change args from array to Sequence (#2972)

      • memoize accepts custom mutable maps as args (#2832)

      • Make it easier to handle a network request (#2883)

      • Make Print_Handler.println public (#3032)

      • In Mutable_Array, inherit from Buffer instead of Sequence (#2870)

    • Fix code of potentially uninitialized access (#2866)

  • Parser
    • Performance improvements

      • Lexer performance optimizations (#2943, #2944, #2942)

      • Parse .this as part of callTail or typeTail (#2980)

      • Avoid repeated parsing of actual args in a call, instead parse actual as expr and convert to type as needed (#2953)

      • Minor performance improvement when parsing operatorExpr (#2981)

      • Create second fork in skipOneType a little less eagerly (#2952)

      • When parsing name and the result is dumped, do not create ParsedName (#2948)

    • Clean up parser rules (#2974, #2994, #2976)

    • Move parsing of .env and .type to callTail (#2979)

    • For better error messages, set source range for Expr (#2995)

  • AST
    • Remove Types.intern (#2454)

    • Remove state from abstract interpreter (#2933)

    • Loop: various improvements (#2956, #2908, #2858, #2843, #2859)

    • fix Feature.toString() when used very early in frontend (#2868)

    • fix Empty Stack during DFA (#2768)

    • fix destructuring where with field name reuse (#2920)

    • show warning if -> is used in operator (#2884)

    • improved error handling (#3033, #3006, #3014)

    • type inference for arguments for feature with generics (#3008)

    • fix dynamic_type used on features defined inside of type features (#2792)

  • Front End
    • add logic evaluating visibility when inheriting (#3028)

    • turn If into match expression early (#2661)

    • mark fields as final, improve precondition (#2837)

    • merge logic of addInheritedFeature and addToDeclaredOrInherited (#3019)

    • For better error messages, source ranges are not stored in Fuziom module files instead of source position (#2844)

    • The universe is not written to a fum-file (#2846)

  • Middle End
    • bugfix: Implicitly instantiate type features (#2987)

    • air: add !t.isOpenGeneric() to preconditions (#2968)

  • Fuzion Intermediate Representation
  • Data Flow Analysis
    • Instance: fix toString for NO_SITE (#2957)

    • in fuzion.java.call_v0, add third argument to readFields (#2830)

    • improve error for target not found (#2847)

  • all backends
    • java intrinsics, add parameter: signature (#2935)

    • java intrinsics: fix creation and access of java arrays of none-primitive values (#2998)

  • JVM back end
    • fix issue in precondition of drop (#2963)

    • fix showing elapsed time stats (-verbose > 1) (#2848)

  • C back end
    • fix field access on ref and value targets (#2928)

    • fix nanosleep interruption by signal (#2885)

    • initial work for cross compilation (#2906)

  • interpreter back end
    • remove dependency on AST (#2861, #2862, #2874)

    • remove air, base on fuir only (#2894)

    • fix java intrinsics, wrap result in outcome (#2840)

    • fix position in error Intrinsic feature not supported (#2954)

    • use the fuir of DFA (#2986)

    • getField performance (#2929)

  • util
    • Avoid repeated output of warning statistics (#2988)

    • Improve parser performance by

      • pre-calculating results of SourceFile.codePointInLine (#2940)

      • Caching line numbers (#2941)

    • Respect codepoint width for correct error position display with codepoints that have non-standard width (#3030)

  • fz and fzjava tools
    • Add option -frontend-only change -no-backend (#2970)

    • Show time in ms for building module (#2849)

    • fzjava: issue with colon in path, illegal character in opaque (#2951)

  • tests
    • disable tests as workaround for #3000 (#3001)

    • fix run_tests scripts in case of test failure (#2891)

    • add test for #122, #1055, #1031, #2321, #2380, #2346 (#2973, #2863, #3031, #2921)

    • record time (#2872)

    • use set_exit_code (#2964)

  • Overall Code
    • Added @SuppressWarnings annotations for some unchecked and rawtypes warnings (#2869)

Cheers,

--The Fuzion Team.

last changed: 2024-06-28