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
- Two talks about Fuzion were accepted for FOSDEM on 4th and 5th of February: Algebraic Effects and Types as First-Class Features in the Fuzion Language and Fuzion: Mapping Java's Features to Simpler Mechanisms. We are looking forward to an in-person event after such a long time!
- Wael Youssfi has finished his internship working on file I/O effects for Fuzion's base library. Big thanks for his contributions and all the best wishes for the future!
- Fuzion language
-
Support for covariant feature redefinition:
a.this.typecan now be used to refer to the type of an outer featurea. 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 typenumeric.this.typesuch that in a redefinitioni32.infix +requires an argument of pf typei32and produces a result of the same type. -
Modifiers
synchronized,constandleafor no longer supported (but are still reserved keywords). -
Added modifier
fixedfor features that should not be inherited by children of the outer feature. - A type parameter
Twith constraintcis now declared usingT type : cwhich is in sync with the syntax for feature inheritancex : c is ....
-
- base library
-
infix ⋃andinfix ⋂are now used for union and intersection instead of∪and∩. -
unit.type.monoidwas added. -
file.ionow supportsseekandfile_position.existswas replaced bystats/lstats. -
Stringnow supportsfind_last,to_valid_utf8,fields_func,cut. -
Indices in strings are now usually byte indices in the utf8-encoding,
e.g.,
String.substringandString.splitnow use utf8-byte indices as arguments. Features working on codepoints were renamed for clarity:pad_startaspad_codepoint_startandsubstring_codepoint. -
listnow has featuresprepend_to_allandintersperse, no longer supportsforceHead. -
outcomenow is a monad such that verbose match-statements can be replaced by concise calls tobind.
-
- fz tool
- C back-end now uses
-Wall -Werrorby default.
- C back-end now uses
- 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.