2024-03-07: Fuzion March Update
Fuzion has made it into gentoo Linux! Also, exciting stuff happened to Fuzion
itself, including support for calling to Java from the JVM backend as well as
the possibility to omit .type.
when calling type features. Here
all the details:
- General
-
The recording of the FUZION talk at FOSDEM is online!
-
The Fuzion GitHub repository is open for external contributors, we added a Contributor License Agreement and documentation for new contributors (#2500, #2502, #2505, #2514, #2538, #2545).
-
We have switched to using JDK 21 ( #2504).
-
Fuzion has been integrated as a development language into gentoo linux!
-
- Documentation
-
Work on a Fuzion reference manual as started ( #2490).
-
Documentation for the
universe
feature was added ( #2625). -
Type features are now included in the generated API documentation ( #2649).
-
- Build infrastructure
-
Added a
base-only
target to theMakefile
for faster build-test cycles (#2501).
-
- Fuzion language
-
The
.type.
can now be omitted in calls to type features (#2631).
-
- base library
-
Intrinsics and effects that allow directory listing have been implemented ( #1688, #2635).
-
Add
infix ::
tolist
, which allows creating a list from a given starting element and a partial function that gets applied on each iteration ( #2516).This permits code like
ints := 0 :: +1
to create a list of all integers starting at
0
and calculating the next element by adding one using the partial function+1
. -
Change
Sequence.infix |
to be an alias formap
, the new alias forfor_each
isSequence.infix !
now ( #2517). -
Handling of infinite sequences has been made more convenient since the number of entries shown by
as_string
is limited for non-finite sequences ( #2528).You can now safely do things like
say (1.. | x->x**2)
which used to crash, but now results in
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100, …]
-
Add feature
String.is_ascii
( #2531). -
Set.add
was implemented due to errors with the abstract version (#2533). -
When producing a string from a sequence, separate the elements with
,
instead of just a,
( #2548). -
Facilities to launch processes have been added ( #2575).
-
Visibility of
Type
is nowmodule:public
, because nothing should inherit from or callType
( #2581). -
bench
now uses thetime.nano
effect ( #2606). -
String
: add features for center, left, and right padding of strings ( #2609).
-
- Front End
-
Improve type inference for tagged union types ( #2582).
# infers that all the numbers to be of type option f64 a := [0.3, option 3.142, nil, 42] # infers that all the numbers to be of type option f64 if b then 42 else option 3.14
-
Improve type inference type parameters ( #2585).
# type parameters for `zip` can now be inferred in this case: prods := ([1,2,3].zip 0.. a,b->a*b)
-
Replace
Could not find called feature
messages by more specific errors in case the feature could be found but is invisible or the argument count does not match ( #2622). -
Suppress
declarationsInLazy
error if it is a subsequent error, due to frequent false-positives ( #2628). -
Fix source range of parsed lambdas ( #2646).
-
- JVM back end
-
The fzjava interface known from the interpreter that allows calling into Java code is now supported by the JVM backend as well ( #2487).
-
Support for the stackmap table attribute was added ( #2499, #2556). This allowed switching to class files for JDK version 21.
-
Improvements to tail recursive call optimization (however, this does still not work in many cases) ( #2543).
-
The
-jar
and-classes
backends now create a run script that allows one to easily run the jar file or the classes (#2547). -
For the
-jar
and-classes
backends, fix the result ofenvir.args
( #2549). -
The
-jar
and-classes
backends now support an optional argument-o=<outputName>
to specify the name of the generated output ( #2567).
-
- C back end
-
Separated
include/fz.h
into platform-specific files, refactored (#2553, #2573, #2601). -
Replace
__atomic
compiler-specific built-ins by C11 standard atomics ( #2563). -
Not longer emits duplicate casts in generated code ( #2592).
-
The generated C source files are not deleted unless
-XkeepGeneratedCode
is set ( #2605).
-
fz
tool-
Run simple examples given on the command line using the
-e <code>
or-execute <code>
argument (#2618). So it is now possible to dofz -e 'say "Hello, world!"'
to run a one-liner.
-
In the case of a contract failure (pre/post-condition or check) due to a bug in the fz tool, the failed expression will now be shown ( #2619).
-
Running
fz
without any arguments now shows the general help instead of the default backend help ( #2648). -
Experimentation with calling the Fuzion compiler via fzjava from the JVM backend have started ( #2536).
-
Cheers,
--The Fuzion Team.