2024-05-17: Fuzion May Update
Clarification of multiple-inheritance semantics and redefinition paired with massive performance improvements in the front end were last month's main changes.
- General
Tokiwa is a partner in the GreenCode consortium in the ITEA4 cluster, where we plan to work on the Fuzion language and tools to make code greener.
Work on a Fuzion module for a nom-like parser combinator framework has started (#2808)
- Documentation
- Build infrastructure
- Fuzion language
A string literal containing exactly one codepoint is now of type
codepoint, which inherits fromString(#2676). This permits writingcode := "࿋".val # results in `4043`instead of
code := "࿋".as_codepoints.first.val # results in `4043`Support for multiple inheritance and redefinition of several features (#3034)
Extend type visibility into type features (#2999)
e.g., in
abc is def is type.test(x abc.def) is say xit is no longer required to qualify the type
abc.def, one can usedefinstead:abc is def is type.test(x def) is say x
pre/postconditions inredef-ined features now needelse/thento clarify that preconditions are weakened and postconditions are strengthened (#3023)A new effect
fuzion.runtime.faultwas added to be used to permit handling of failedpre/postconditions in applications. Supportcheckexpressions to use this effect was added (#2996, #3011)Visibility modifiers are no longer allowed within inner blocks (#2864)
-
Addition of the following new standard library features
union/intersection/exceptetc. inSet(#2904)Map.type.empty(#2831)as_persistent_maptolock_free.map(#2977)container.Persistent_Map(#2960)io.buffered.read_line_while(#2881)option/outcome:prefix !(#2834)In
Buffer, add redefas_string(#3024)Add general definition of a mutable map (#2832)
-
Removal of the following standard library features
-
Changes to the following standard library features
Any.as_stringis no longer an intrinsic but implemented in Fuzion directly(#2893)Rename
option.get defaulttooption.or default(#2925)For sets, maps and lists, renamed
type.from_sequencetotype.new(#2873)Split up
file.writeand make dir effect (#2982)In
spawnchange args fromarraytoSequence(#2972)memoizeaccepts custom mutable maps as args (#2832)Make it easier to handle a network request (#2883)
Make
Print_Handler.printlnpublic (#3032)In
Mutable_Array, inherit fromBufferinstead ofSequence(#2870)
Fix code of potentially uninitialized access (#2866)
Performance improvements
Parse
.thisas part ofcallTailortypeTail(#2980)Avoid repeated parsing of actual args in a call, instead parse actual as expr and convert to type as needed (#2953)
Minor performance improvement when parsing
operatorExpr(#2981)Create second fork in
skipOneTypea little less eagerly (#2952)When parsing
nameand the result is dumped, do not createParsedName(#2948)
Move parsing of
.envand.typetocallTail(#2979)For better error messages, set source range for
Expr(#2995)
Remove
Types.intern(#2454)Remove state from abstract interpreter (#2933)
Loop: various improvements (#2956, #2908, #2858, #2843, #2859)
fix
Feature.toString()when used very early in frontend (#2868)fix
Empty Stack during DFA(#2768)fix destructuring where with field name reuse (#2920)
show warning if
->is used in operator (#2884)type inference for arguments for feature with generics (#3008)
fix
dynamic_typeused on features defined inside of type features (#2792)
add logic evaluating visibility when inheriting (#3028)
turn
Ifinto match expression early (#2661)mark fields as final, improve precondition (#2837)
merge logic of
addInheritedFeatureandaddToDeclaredOrInherited(#3019)For better error messages, source ranges are not stored in Fuziom module files instead of source position (#2844)
The universe is not written to a fum-file (#2846)
Added
@SuppressWarningsannotations for some unchecked and rawtypes warnings (#2869)
Cheers,
--The Fuzion Team.