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.type
can 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.type
such that in a redefinitioni32.infix +
requires an argument of pf typei32
and produces a result of the same type. -
Modifiers
synchronized
,const
andleaf
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 constraintc
is now declared usingT type : c
which 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.monoid
was added. -
file.io
now supportsseek
andfile_position
.exists
was replaced bystats
/lstats
. -
String
now supportsfind_last
,to_valid_utf8
,fields_func
,cut
. -
Indices in strings are now usually byte indices in the utf8-encoding,
e.g.,
String.substring
andString.split
now use utf8-byte indices as arguments. Features working on codepoints were renamed for clarity:pad_start
aspad_codepoint_start
andsubstring_codepoint
. -
list
now has featuresprepend_to_all
andintersperse
, no longer supportsforceHead
. -
outcome
now is a monad such that verbose match-statements can be replaced by concise calls tobind
.
-
- fz tool
- C back-end now uses
-Wall -Werror
by 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.