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 typeTHIS_TYPEis used in the abstract feature.conflicting argument names as in
f(i, i i32) isnow 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
$$x1if the operator is declared in the current (or outer) feature. Type parameters in this case are inferred from the actual arguments. A
matchstatement now may have an empty list of cases
- base library
added more effects to
io.file:delete,move,stat.existsfixed spelling errors, updated syntax for type parameters (comments still used
</>)removed
javafeature and all inner featuresjava..., these were unused.Fuzion modules now exist for most standard Java modules:
java.basejava.compilerjava.datatransferjava.desktopjava.instrumentjava.loggingjava.managementjava.management.rmijava.namingjava.net.httpjava.prefsjava.rmijava.scriptingjava.security.jgssjava.security.sasljava.sejava.smartcardiojava.sqljava.sql.rowsetjava.transaction.xajava.xml.cryptojava.xmljdk.accessibilityjdk.attachjdk.charsetsjdk.compilerjdk.crypto.cryptokijdk.crypto.ecjdk.dynalinkjdk.editpadjdk.httpserverjdk.jartooljdk.javadocjdk.jconsolejdk.jdepsjdk.jdijdk.jdwp.agentjdk.jfrjdk.jlinkjdk.jpackagejdk.jshelljdk.jsobjectjdk.jstatdjdk.localedatajdk.management.agentjdk.managementjdk.management.jfrjdk.naming.dnsjdk.naming.rmijdk.netjdk.nio.mapmodejdk.sctpjdk.security.authjdk.security.jgssjdk.xml.domjdk.zipfsrenamed several features from
camelCasetosnake_caseorCapitalized_snake_caseforreftypes.-
abstract equality (see design/equality) as explained by Noble et al in The Left Hand of Equals is now supported: base library feature
has_equalitydefines an abstract featurehas_equality.type.equalitythat can be redefined for heir features such asstring. 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 inheritObject.equals.For now, features
equalsandinfix ≟can be used to compare according to abstract equality as defined by the operand's type. Eventually,infix =will be used for this.type.equalitywas 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,
forAllwas renamed asfor_eachto avoid confusion withinfix ∀.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
-modulesand-moduleDirsarguments 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
Added graphics on benchmark performance development time
Added design documents for Types/this.type and Inheritance/Fixed Features
- Build infrastructure
Some changes to allow building on NixOS
Cheers,
--Fridtjof.