2024-12-27: Fuzion December Update
December is almost over and was so busy that we almost failed to deliver this months news. But, here we go:
The Focus last month was performance of the fz
command, in
particular the DFA analysis could be improved, but there is still a long way
to go. A lot is happening in the base library, where we are trying different
ways to make best use of effect handlers. Also, much work goes into usability,
better error reporting and plain bug fixes.
- General
There will be a presentation on Fuzion at FOSDEM:
Effects Everywhere: Error Handling and Design-By-Contract in Fuzion by Fridtjof Siebert on Sunday 12h30 in room H.1308 in the Declarative and Minimalistic Computing devroom. Hope we meet there, or you join online!
- Fuzion language
forbid definition of types (constructors, choices) in type features (#3975). Even though it sometimes seems convenient, having types whose outer types are type features and cotypes causes a major complication of the language.
forbid unused fields (#4086). A field that is never read is typically an error. If, e.g., during development, a field
a := f x
is currently unused, it either has to be ignored explicitly usingignore a
, or it has to be renamed as-
, i.e., using_ := f x
.
- Base library
-
New features
add infix version of instate_self (#4097) and
effect_type <- effect_instance ! code
(#4105)This permits instating an effect as follows
my_mutate ! ()-> counter <- my_mutate.env.new 0 while there_is_more do counter <- 1 + counter say counter
instead of
my_mutate.instate_self ()-> counter <- my_mutate.env.new 0 while there_is_more do counter <- 1 + counter say counter
as well as
Output <- my_output_handler ! ()-> Output.env.print "hi"
instead of
Output.instate my_output_handler ()-> Output.env.print "hi"
add
container.mutable_tree_map.replace
returning old value, changeput
to return nothing (#4317)add
process
effect (#4111)freeze backing internal arrays of
array2
,array3
etc. (#4311)structured concurrency (#4095)
-
Changed features
base/net/connection: do not depend on
net.connections
effect (#4326)Fix
as_string
for wrapped java arrays by adding check for java primitive toarray_to_java_object
'sT
(#4151)change
lock_free.map
tolock_free.Map ref
(#4178)change
Write_Provider.write
to accept Sequence of bytes (#4085)fix
order_map.index []
(#4122)io.reader
/io.writer
add precondition (#4089)io.file
make use ofio.buffered
(#4074)io.file
/io.dir
use inheritance instead of type parameter for distinguishing files (#4113)move
or
,and_then
,or_else
,and
toswitch
(#4170)move
array2
/array3
instatiation to type feature (type.new) (#4207)repository restructuring: move lib to modules/base (#4315)
move
mapped_buffer
to its own effect (#4150)reader
, change result types to switch instead of plain choice (#4090)rename
String.concat1
asString.concat
(#4185)rename
TRUE
/FALSE
totrue_
/false_
to conform to fuzion naming conventions(#4024)Sequence
implementsort
viapre T:property.partially_orderable
(#3963)remove local mutate param
LM
frombuffered.writer
(#4121)
-
- Parser
fix parsing of
infix !
operator that was falsely skipped byskipEffects
(#4198)require dots
...
after open type parameters to make their use more obvious (#4298)create error if constructor is marked
abstract
,intrinsic
ornative
(#4284)fix syntax error when fully qualifying inheritance calls (#4234)
fix scoping for blocks in braces (#4276)
- Front End
Allow features with equal names if visibility avoids ambiguity (#4125)
fix result type inference in ternary (#4051)
write cotype origin to fum-file (#4190)
check effect signatures for existence of types and flag error if type given is not an effect (#4129, #4138)
Suppress follow-up errors in jenkins'
man_or_boy2
andtya_field
tests (#4158)Allow
.this
as a function result type, fix #3731 by allowing that case instead of producing an error (#4196, #4294)bug fixes
Fixed actual type parameter checking that was not strict enough (#4238)
Suppress subsequent errors in actual arguments (#4031)
enable post conditions for abstract features and constructors (#4249)
fix bug in type inference for recursive feature (#4152)
fix boxing when passing
this
-type to aref
feature (#4265)fix NullPointerException when fully qualifying types in base.fum (#4232)
fix
resolveFormalArg
, when target type is generic argument (#4066)fix unjustified partial ambiguity (#4286)
allow use of free types in type constraints (#4230)
do not permit feature result type inference for
abstract
features since these would always beunit
and seldom useful (#4060)relax check that
findInheritanceChain
is successful (#4321)
cleanup
rename featureIsThisRef -> featureIsRef (#4293)
simplify
AbstractType.isFunctionType
(#4067)add method
selfOrConstraint
for common pattern (#4124)avoid repeated immediate function call if
resolveTypes
called repeatedly (#4330)change outer ref names from
#^x.y
to#^<x.y>
, fix #4316 (#4329)make selfOrConstraint instance methods (#4140)
better precondition for
AbstractFeature.findInheritanceChain
(#4318)fix merge conflict: fix call to
selfOrConstraint
(#4157)rename
AbstractFeature.isThisRef
->isRef
(#4126)
- Util
- DFA
performance
Performance improvements (about 3%): added version of AbstractInterpreter without RESULT (#4241)
At end of DFA, do not run extra iterations after
_fuir.lookupDone()
was called (#4117)Disable escape analysis during DFA for jvm/interpreter backends (#4177)
Do not cache
TaggedValue
twice (#4166)Fully suppress the generation of EmbeddedValue if escape analysis not needed (#4213)
Performance improvement by originally treating calls as unit type calls (#4103)
Site-insensitive analysis for non-constructors, improve #4028 (#4148)
debugging
bug fixes
enhanced creating generic results (#4227)
remove
fz
option-Xdfa=on/off
(#4135)
- FUIR
turn
env
into a call to an intrinsic (#4189)During monomorphization, check for ambiguous result types due to ref targets and
this
-types, fix #4273 (#4274)Add precondition for Clazz of
Types.t_ERROR
not to be created. (#4101)better error output in case of cyclic value fields (#4319)
cache result of
GeneratingFUIR.constClazz
(#4167)cache results of
clazzResultClazz
,clazzArgClazz
andclazzArgCount
(#4212)fix
Clazz.findOuter
(#4144)fix Index out of bounds (#4240)
- All back ends
- JVM back end
- C back end
add more cases for native test (#4229)
add small test for native function calling (#4211)
add void, for functions with no args (#4210)
do not expose get_family, get_socket_type, get_protocol (#4226)
split generated code in .h and .c file (#4208)
fix
ArrayIndexOutOfBounds
intutorial/examples/match_example1.fz
(#4225)remove Const_String from
clazzNeedsCode
in C and JVM backends (#4236)
- Interpreter back end
- Windows
- fz command
- Tests
Cheers,
--The Fuzion Team.