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

2022-12-07: Fuzion December Update

Hi,

November was a fairly productive month with important advances in the language and standard library.

  • Fuzion language
    • An implicit (empty) else-branch in an if-statement now results in unit.

    • Inheritance for type features:
      Abstract type features using arguments or results of the corresponding type can now be redefined using the actual type. For now (until better syntax is supported) the implicit generic type THIS_TYPE is used in the abstract feature.

    • conflicting argument names as in

      f(i, i i32) is

      now result in an error.

    • prefix, postfix and infix operators can now be declared with type parameters and one (prefix, postfix) or two (infix) value arguments:

      prefix $$(X type, a X) => "type:{X.name} val:$a"

      permits a call $$x1 if the operator is declared in the current (or outer) feature. Type parameters in this case are inferred from the actual arguments.

    • A match statement now may have an empty list of cases

  • base library
    • added more effects to io.file: delete, move, stat.exists

    • fixed spelling errors, updated syntax for type parameters (comments still used </>)

    • removed java feature and all inner features java..., these were unused.

    • Fuzion modules now exist for most standard Java modules: java.base java.compiler java.datatransfer java.desktop java.instrument java.logging java.management java.management.rmi java.naming java.net.http java.prefs java.rmi java.scripting java.security.jgss java.security.sasl java.se java.smartcardio java.sql java.sql.rowset java.transaction.xa java.xml.crypto java.xml jdk.accessibility jdk.attach jdk.charsets jdk.compiler jdk.crypto.cryptoki jdk.crypto.ec jdk.dynalink jdk.editpad jdk.httpserver jdk.jartool jdk.javadoc jdk.jconsole jdk.jdeps jdk.jdi jdk.jdwp.agent jdk.jfr jdk.jlink jdk.jpackage jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.agent jdk.management jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.nio.mapmode jdk.sctp jdk.security.auth jdk.security.jgss jdk.xml.dom jdk.zipfs

    • renamed several features from camelCase to snake_case or Capitalized_snake_case for ref types.

    • abstract equality (see design/equality) as explained by Noble et al in The Left Hand of Equals is now supported: base library feature has_equality defines an abstract feature has_equality.type.equality that can be redefined for heir features such as string. Note that the equality operation is bound to the type, so different types along an inheritance hierarchy may define different equality operations. This is in strong contrast to object-oriented approaches like Java that inherit Object.equals.

      For now, features equals and infix ≟ can be used to compare according to abstract equality as defined by the operand's type. Eventually, infix = will be used for this.

      type.equality was defined for base library features without type parameters (type features are not yet supported for features with type parameters)

    • Added features to set env variables.

    • In some library features, forAll was renamed as for_each to avoid confusion with infix ∀.

    • Improved documentation of many features

  • fz tool
    • C back-end now provides options -CC= and -CFlags= to specify C compiler and options to be used.

  • fzjava tool
    • Now accepts -modules and -moduleDirs arguments to specify Fuzion modules already generated that a Java module depends on. This avoids repeated declaration of unit-value features for Java packages.

  • fzdocs tool
    • has been added to the main Fuzion repository.

  • C back-end
    • Fixed use of thread locals on Windows

  • Language Server
    • The language server now builds on the main branch of Fuzion (used to be a branch with a few additional patches).

  • fuzion-lang.dev website
  • Build infrastructure
    • Some changes to allow building on NixOS

Cheers,

--Fridtjof.