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 xis 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 counterinstead of
my_mutate.instate_self ()-> counter <- my_mutate.env.new 0 while there_is_more do counter <- 1 + counter say counteras 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.replacereturning old value, changeputto return nothing (#4317)add
processeffect (#4111)freeze backing internal arrays of
array2,array3etc. (#4311)structured concurrency (#4095)
-
Changed features
base/net/connection: do not depend on
net.connectionseffect (#4326)Fix
as_stringfor wrapped java arrays by adding check for java primitive toarray_to_java_object'sT(#4151)change
lock_free.maptolock_free.Map ref(#4178)change
Write_Provider.writeto accept Sequence of bytes (#4085)fix
order_map.index [](#4122)io.reader/io.writeradd precondition (#4089)io.filemake use ofio.buffered(#4074)io.file/io.diruse inheritance instead of type parameter for distinguishing files (#4113)move
or,and_then,or_else,andtoswitch(#4170)move
array2/array3instatiation to type feature (type.new) (#4207)repository restructuring: move lib to modules/base (#4315)
move
mapped_bufferto its own effect (#4150)reader, change result types to switch instead of plain choice (#4090)rename
String.concat1asString.concat(#4185)rename
TRUE/FALSEtotrue_/false_to conform to fuzion naming conventions(#4024)Sequenceimplementsortviapre T:property.partially_orderable(#3963)remove local mutate param
LMfrombuffered.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,intrinsicornative(#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_boy2andtya_fieldtests (#4158)Allow
.thisas 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 areffeature (#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
abstractfeatures since these would always beunitand seldom useful (#4060)relax check that
findInheritanceChainis successful (#4321)
cleanup
rename featureIsThisRef -> featureIsRef (#4293)
simplify
AbstractType.isFunctionType(#4067)add method
selfOrConstraintfor common pattern (#4124)avoid repeated immediate function call if
resolveTypescalled repeatedly (#4330)change outer ref names from
#^x.yto#^<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
TaggedValuetwice (#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
fzoption-Xdfa=on/off(#4135)
- FUIR
turn
envinto 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_ERRORnot to be created. (#4101)better error output in case of cyclic value fields (#4319)
cache result of
GeneratingFUIR.constClazz(#4167)cache results of
clazzResultClazz,clazzArgClazzandclazzArgCount(#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
ArrayIndexOutOfBoundsintutorial/examples/match_example1.fz(#4225)remove Const_String from
clazzNeedsCodein C and JVM backends (#4236)
- Interpreter back end
- Windows
- fz command
- Tests
Cheers,
--The Fuzion Team.