Skip to content

Commit

Permalink
Releasing 0.8.3 (#3840)
Browse files Browse the repository at this point in the history
add Claudio's example
  • Loading branch information
ggreif authored Feb 24, 2023
1 parent 46b2f88 commit 73330dd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@
* new 'let-else' construct for handling pattern-match failure (#3836).
This is a frequently asked-for feature that allows to change the control-flow
of programs when pattern-match failure occurs, thus providing a means against
the famous "pyramid of doom" issue.
E.g. an expression like
the famous "pyramid of doom" issue. A common example is look-ups:
``` Motoko
shared func getUser(user : Text) : Id {
let ?id = Map.get(users, user) else { throw Error.reject("no such user") };
id
}
```
Similarly, an expression like
``` Motoko
(label v : Bool { let <pat> = <exp> else break v false; true })
```
can evaluate to a `Bool`, signifying whether `<pat>` matches `<exp>`.
evaluates to a `Bool`, signifying whether `<pat>` matches `<exp>`.
* Improve recursive deserialization capacity to match recursive serialization capacity by reducing
Wasm stack consumption (#3809).
Expand Down

0 comments on commit 73330dd

Please sign in to comment.