Release Notes for V0.6.18

V0.6.18 of the SDK is now available!

Features and fixes include the following updates:

  • A fix to dfx upgrade that prevents a main thread panic when Option::unwrap() is called on a None value.
  • A fix to the name of the language service command to restore its compatibility with IDEs.

For Motoko:

  • New syntax for option types: Option blocks do ? <block> and option checks <exp> !.
    Inside an option block, an option check validates that its operand expression is not null. If it is, the entire option block is aborted and evaluates to null. This simplifies consecutive null handling by avoiding verbose switch expressions.
    For example, the expression do? { f(x!, y!) + z!.a } evaluates to null if either x, y or z is null; otherwise, it takes the options’ contents and ultimately returns ?r, where r is the result of the addition.
  • The argument to a do or do ? expression must be a block { ... }, never a simple expression.

Full release notes and more can be found here