2024-01-11: Fuzion January Update
In an attempt to solve last month's Advent of Code challenge using Fuzion, a number of improvements of the standard library to improve usability and fix performance issues have been made.
Here is what happened in detail:
- General
-
There will be a talk on Fuzion's JVM backend at FOSDEM on 3rd of February: The Challenges of Running the Fuzion Language Natively on the OpenJDK. We are looking forward to see you there!
-
- Fuzion language
-
When redefining an inherited feature, it is now enforced that the visibility is not restricted (#2233).
-
Syntax sugar for access to tuple elements now permits using
t.0/t.1/... instead oft.values.0/t.values.1/...: One can now uset := (3,4) say (t.0 + t.1)instead of
t := (3,4) say (t.values.0 + t.values.1)(#2392).
-
- base library
-
io.buffered.read_stringnow may returnio.end_of_file(#2227). -
ctriehas been moved to thelock_freemodule (#2238). -
The monoids
all,any, andparityhave been added tobool.type(#2287). -
Many useful features have been made public:
-
optionnow inherits fromSequence(#2291). -
time.durations.as_stringhas a fixed width now such that nice looking timing tables are easier to create (#2330). -
A
stackdata type using local mutation is available now (#2351). -
mapandflat_mapare now features ofSequencethat produce a new Sequence. Specific variants forarrayorlistthat produce anarrayor alisthave been renamed asmap_to_arrayandmap_to_list, etc., resp. (#2317). -
countanddropwere redefined for array backed sequences to achieve O(1) performance (#2337). -
reverse,map_pairs,fold1, andfoldfwere added toSequence(#2341). -
Unused features were removed from
effects.fz(#2352). -
For debugging of functions, a feature
logwas added which is like say, but instead of returningunit, it returns its argument (#2297). -
Output of
list.as_stringhas been improved for empty entries (#2314). -
Performance improvements for
io.stdinandio.buffered.reader(#2343). -
Pipe operators
|>,||>,|||>, etc. have been added (#2355), so you can now do things like(3,4) ||> (+) |> saywhich will first destructure the tuple into
3and4, then applyinfix +to add these and pass the result as an argument to say.
-
- Front end
-
this.typecan now be used inside of the corresponding type feature (#2296). -
Support for partial application with type parameters has been implemented (#2355). This was required, e.g., for the pipe operator to work with partial application as in
"Hello" |> say. -
Error output for
this-types now usesxyz.thisinstead ofxyz.this.typeto match the current syntax (#2356). -
Fixed type inference for numeric literals wrapped in a lazy value (#2363).
-
Fixed false detection of ambiguous code due to partial applications (#2298).
-
Improved type inference for function argument types (#2316).
-
Mark result clazz of intrinsic constructor as instantiated, this paves part of the way for fzjava integration with the JVM backend (#2394).
-
- Middle end
- C back end
-
Enable
-fno-omit-frame-pointerby default to enhance debugging (#2373).
-
Cheers,
--The Fuzion Team.