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

2023-01-12: Fuzion January Update

Hi,

In December, Fuzion improvements focused on the standard library and language improvements for covariance. Here is what has happened in detail:

  • General
  • Fuzion language
    • Support for covariant feature redefinition:

      a.this.type can now be used to refer to the type of an outer feature a. This can be used, e.g., to ensure that an argument or result of a feature has the same type as the target. E.g., numeric.infix + can require the argument and result to be of type numeric.this.type such that in a redefinition i32.infix + requires an argument of pf type i32 and produces a result of the same type.

    • Modifiers synchronized, const and leaf or no longer supported (but are still reserved keywords).
    • Added modifier fixed for features that should not be inherited by children of the outer feature.
    • A type parameter T with constraint c is now declared using T type : c which is in sync with the syntax for feature inheritance x : c is ....
  • base library
    • infix ⋃ and infix ⋂ are now used for union and intersection instead of and .
    • unit.type.monoid was added.
    • file.io now supports seek and file_position. exists was replaced by stats/lstats.
    • String now supports find_last, to_valid_utf8, fields_func, cut.
    • Indices in strings are now usually byte indices in the utf8-encoding, e.g., String.substring and String.split now use utf8-byte indices as arguments. Features working on codepoints were renamed for clarity: pad_start as pad_codepoint_start and substring_codepoint.
    • list now has features prepend_to_all and intersperse, no longer supports forceHead.
    • outcome now is a monad such that verbose match-statements can be replaced by concise calls to bind.
  • fz tool
    • C back-end now uses -Wall -Werror by default.
  • fzdocs tool
    • Now detects sample code in comments and makes it runnable in the browser.
  • fuzion-lang.dev website
    • improved layout for small devices like smartphones.
    • Added design page for covariance and update page on casts for dynamic / ref types.

Cheers,

--Fridtjof.