# Motoko Biweekly Update Part 8!

Hi Motoko Devs!

Welcome to the latest Motoko update post.

If you missed the last update post from the Motoko team, check it out here! Last time we talked about a generational GC demo and performance optimizations for our VSCode Extension.

Today we'll be talking about a new let-else binding and improved deserialization in Candid!

## New Language Feature: let-else binding!​

There is a new let binding known as the let-else binding! let-else works similarly to the usual let binding, except there is an else block that gets executed in case of a pattern match failure.

E.g. assuming foo() returns type ?Nat

let ?x = foo() else { Debug.print "foo failed"; return };

If foo() returns null, null doesn't match the pattern ?x, and so "foo failed" is printed and execution returns out of the current function. Otherwise, the Nat is bound to x and execution continues forward.

This can be really useful to avoid deeply nested switch statements, such as the following:

switch (foo()) {  case (?x) {    switch (bar()) {      case (?y) {        switch (baz()) {          case (?z) {            return #ok x + y + z;          }          case null {            return #err "baz failed";          }        }       };      case null {        return #err "bar failed";      }    }  };  case null {    return #err "foo failed with";  }}

With let-else bindings, you get the following:

let ?x = foo() else { return #err "foo failed" };let ?y = bar() else { return #err "bar failed" };let ?z = baz() else { return #err "baz failed" };return #ok x + y + x

This feature was inspired by the same feature in rust.

See the PR and more details here. You can find this feature in version 0.8.3 of moc.