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 x
it is no longer required to qualify the type
abc.def
, one can usedef
instead:abc is def is type.test(x def) is say x
pre
/post
conditions inredef
-ined features now needelse
/then
to clarify that preconditions are weakened and postconditions are strengthened (#3023)A new effect
fuzion.runtime.fault
was added to be used to permit handling of failedpre
/post
conditions in applications. Supportcheck
expressions 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
/except
etc. inSet
(#2904)Map.type.empty
(#2831)as_persistent_map
tolock_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_string
is no longer an intrinsic but implemented in Fuzion directly(#2893)Rename
option.get default
tooption.or default
(#2925)For sets, maps and lists, renamed
type.from_sequence
totype.new
(#2873)Split up
file.write
and make dir effect (#2982)In
spawn
change args fromarray
toSequence
(#2972)memoize
accepts custom mutable maps as args (#2832)Make it easier to handle a network request (#2883)
Make
Print_Handler.println
public (#3032)In
Mutable_Array
, inherit fromBuffer
instead ofSequence
(#2870)
Fix code of potentially uninitialized access (#2866)
Performance improvements
Parse
.this
as part ofcallTail
ortypeTail
(#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
skipOneType
a little less eagerly (#2952)When parsing
name
and the result is dumped, do not createParsedName
(#2948)
Move parsing of
.env
and.type
tocallTail
(#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_type
used on features defined inside of type features (#2792)
add logic evaluating visibility when inheriting (#3028)
turn
If
into match expression early (#2661)mark fields as final, improve precondition (#2837)
merge logic of
addInheritedFeature
andaddToDeclaredOrInherited
(#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
@SuppressWarnings
annotations for some unchecked and rawtypes warnings (#2869)
Cheers,
--The Fuzion Team.