2023-02-13: Fuzion February Update
Hi,
January was a busy month for the Fuzion team with changes to the language, new features in the standard library, as well as lots of clean up work happening. Besides the usual bug fixing, these are the highlights:
- General
- Fuzion language
-
type features can now access the type parameters of the underlying
feature, e.g.,
Sequence (T type) is ... type.empty Sequence T is lists.empty T
-
Add syntax for effects in feature declarations.
This is ignored at the moment, the idea is to make this required for public features in a module.HelloWorls ! io.out is say "HelloWorld!"
- Fixed many bugs relating to type features.
-
type features can now access the type parameters of the underlying
feature, e.g.,
- base library
-
String
now supports thesplit_n
,split_after
, andsplit_after_n
features. list.init
was added.-
The internal
fuzion.sys.fileio
code has been cleaned up, some parts previously implemented as intrinsics are now implemented in pure Fuzion. The documentation forfileio
has been improved.On Windows,
stdout
andstderr
is now opened in binary mode. This ensures the output is identical to Fuzion's output on other platforms. - The documentation has been improved for many standard library features. Some features now contain inline code examples, which are runnable in the browser on fuzion-lang.dev.
-
In an effort to make the Fuzion standard library naming more consistent, a lot of features have been renamed, and support for their old names has been dropped. This includes features such as
string
, which is nowString
,Object
is nowAny
, ormap_of
(which used to bemapOf
).See the design document on identifiers for more information.
-
Equality testing is now supported virtually everywhere using the new
type.equality
type feature. Additionally, some features already use type features, for example:String.type.join
orbitset.type.empty
. -
Haskell-stype
infix :
operator for lazy lists was added: e.g., to prepend an element you can use0 : ()->[1,2,3,4].asList
. -
Sequence.infix []
can now be called without an argument. This new feature returns a feature which takes an index, and returns the element of the sequence at the given index. -
Reduced the hierarchy of features with type parameters with the help of
type features. In particular,
hasHash
,partially_ordered
, andordered
have been replaced byhas_hash
,has_partial_order
, andhas_total_order
. -
Extended
mutate
effect to support local mutability in otherwise pure code. Type parameters of user-defined heirs ofmutate
are used to identify local mutate instances. Mutable values can be closed to disallow future mutations.
-
- fz tool
- Some error messages have been improved.
- fzjava tool
-
improved performance by lazily accessing data from dependent
.fum
files.
-
improved performance by lazily accessing data from dependent
- fzdocs tool
- There is now a link pointing to redefined features, rather than just including the comment of the redefined feature. This makes navigating the documentation easier.
- The emoji in the page titles, 🎆 (effects) and 🌌 (universe), which are potentially confusing to new users, have been removed from the documentation.
- Private features are now hidden from the documentation by default. If wanted, a separate version of the documentation can be generated by fzdocs where the visibility of private features can be toggled in the browser. This variant is useful for developers working on the internals of a given library.
- fuzion-lang.dev website
- general improvements to the content: better descriptions, fixed spelling and grammar, other smaller changes and updates.