MoonBit Update
- Introduced support for multi-line strings, requiring each line to commence with
#|
. Multi-line strings allow for breaks and comments between lines, but do not support escape sequences or string interpolation.
- Functional loop: A functional style loop. Here,
continue
is only allowed at the position of tail recursion calls, and within the loop,break
can be used to return a value early.
- Added support for
Trait::method
calls: Enables calling trait methods in the form ofDebug::debug_write(self, buf)
.
- Supported implicit conversion to trait objects. When a trait object is explicitly required in the context,
as SomeTrait
will be automatically inserted. For example, in the code below:
Now we can omit as Debug
.
- Supported inlay hints for function parameters.
- Strings and character literals now support Unicode escapes, hexadecimal escapes, and octal escapes.